]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- correct permissions for mkdir
authorArvin Schnell <aschnell@suse.de>
Wed, 16 Feb 2011 15:41:07 +0000 (16:41 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 16 Feb 2011 15:41:07 +0000 (16:41 +0100)
snapper/File.cc

index 202ecd2dab2a8c7e043c53c30099f69e0f990c7a..8a7d2eed06167e4e9fd98a8b2735b322ee5e5808 100644 (file)
@@ -360,7 +360,8 @@ namespace snapper
            switch (fs.st_mode & S_IFMT)
            {
                case S_IFDIR: {
-                   mkdir(getAbsolutePath(LOC_SYSTEM).c_str(), 0777);
+                   mkdir(getAbsolutePath(LOC_SYSTEM).c_str(), 0);
+                   chmod(getAbsolutePath(LOC_SYSTEM).c_str(), fs.st_mode);
                } break;
 
                case S_IFREG: {