[gnome-ostree] build: Add to mode of installed files, don't overwrite



commit 9ea933469a764a92619ca64ec8d536a2c791eaa7
Author: Colin Walters <walters verbum org>
Date:   Thu Feb 14 08:59:57 2013 -0500

    build: Add to mode of installed files, don't overwrite
    
    This was a bad translation from the Python.

 src/ostbuild/js/tasks/task-build.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ostbuild/js/tasks/task-build.js b/src/ostbuild/js/tasks/task-build.js
index 862037d..56aa5f2 100644
--- a/src/ostbuild/js/tasks/task-build.js
+++ b/src/ostbuild/js/tasks/task-build.js
@@ -301,7 +301,8 @@ const TaskBuild = new Lang.Class({
            let minimalMode = 436; // u+rw,g+rw,o+r
            if (srcInfo.get_file_type() == Gio.FileType.DIRECTORY)
                minimalMode |= 64; // u+x
-           GSystem.file_chmod(srcFile, minimalMode, cancellable);
+           let mode = srcInfo.get_attribute_uint32('unix::mode');
+           GSystem.file_chmod(srcFile, mode | minimalMode, cancellable);
        }
 
        if (srcInfo.get_file_type() == Gio.FileType.DIRECTORY) {
@@ -315,7 +316,7 @@ const TaskBuild = new Lang.Class({
            e.close(cancellable);
            srcFile.delete(cancellable);
        } else {
-           GSystem.file_linkcopy(srcFile, destFile, 0, cancellable);
+           GSystem.file_linkcopy(srcFile, destFile, Gio.FileCopyFlags.ALL_METADATA, cancellable);
            GSystem.file_unlink(srcFile, cancellable);
        } 
     },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]