aboutsummaryrefslogtreecommitdiffstats
path: root/backend/raw_write.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/raw_write.py')
-rwxr-xr-xbackend/raw_write.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py
index a29b604..fe0fda9 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -39,7 +39,7 @@ from subprocess import Popen, PIPE
class Dumper(object):
- def _do_write(self,source,target, b):
+ def _do_write(self,source,target, b, backup_mode, uid, gid):
# Writing step
#Dump mode
self.returncode=0
@@ -107,6 +107,9 @@ class Dumper(object):
self.return_message = message
self.finished.set()
return
+ if backup_mode:
+ # Restore user as owner
+ os.chown(target, uid, gid)
try:
ofc.close()
except: