Revert "added arguments for permissions of created dirs and files to deltatar.create_...
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Apr 2016 13:48:27 +0000 (15:48 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Apr 2016 13:48:27 +0000 (15:48 +0200)
This reverts commit 8db5dd46357def656b84019cded8aed8f0626a03.

(simpler and more important to have UI deal with unclean input)

deltatar/deltatar.py

index 9ae5fd2..ff8292a 100644 (file)
@@ -508,8 +508,7 @@ class DeltaTar(object):
                        key_length=key_length)
 
     def create_full_backup(self, source_path, backup_path,
-                           max_volume_size=None, extra_data=dict(),
-                           dir_perms=0o077, file_perms=0o066):
+                           max_volume_size=None, extra_data=dict()):
         '''
         Creates a full backup.
 
@@ -552,7 +551,7 @@ class DeltaTar(object):
 
         # try to create backup path if needed
         if not os.path.exists(backup_path):
-            os.makedirs(backup_path, dir_perms)
+            os.makedirs(backup_path)
 
         if not os.access(backup_path, os.W_OK):
             raise Exception('Backup path "%s" is not writeable' % backup_path)
@@ -655,8 +654,7 @@ class DeltaTar(object):
         tarobj.close()
 
     def create_diff_backup(self, source_path, backup_path, previous_index_path,
-                           max_volume_size=None, extra_data=dict(),
-                           dir_perms=0o077, file_perms=0o066):
+                           max_volume_size=None, extra_data=dict()):
         '''
         Creates a backup.
 
@@ -712,7 +710,7 @@ class DeltaTar(object):
 
         # try to create backup path if needed
         if not os.path.exists(backup_path):
-            os.makedirs(backup_path, dir_perms)
+            os.makedirs(backup_path)
 
         if not os.access(backup_path, os.W_OK):
             raise Exception('Backup path "%s" is not writeable' % backup_path)