aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rwxr-xr-xbackend/magiback6
-rwxr-xr-xbackend/raw_write.py3
2 files changed, 4 insertions, 5 deletions
diff --git a/backend/magiback b/backend/magiback
index f5c58a7..7f3785b 100755
--- a/backend/magiback
+++ b/backend/magiback
@@ -16,6 +16,7 @@ class Isodumper(raw_write.Dumper):
<method name='do_write'>
<arg type='s' name='source' direction='in'/>
<arg type='s' name='target' direction='in'/>
+ <arg type='x' name='size' direction='in'/>
</method>
<method name='do_unmount'>
<arg type='s' name='device' direction='in'/>
@@ -53,11 +54,10 @@ class Isodumper(raw_write.Dumper):
self.authorized_sender_read = set()
self.authorized_sender_write = set()
- def do_write(self,source, target, dbus_context):
+ def do_write(self,source, target, size, dbus_context):
if check_permission('org.mageia.Magiback.Isodumper.write',dbus_context):
- print("Writing")
self.finished.clear()
- self.thread = threading.Thread(target=self._do_write, args=(source, target, ))
+ self.thread = threading.Thread(target=self._do_write, args=(source, target, size, ))
self.thread.start()
else:
self.return_message = "Access denied"
diff --git a/backend/raw_write.py b/backend/raw_write.py
index 309cf17..ed617cd 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -37,11 +37,10 @@ import gnupg
class Dumper(object):
- def _do_write(self,source,target):
+ def _do_write(self,source,target, b):
# Writing step
#Dump mode
self.returncode=0
- b=os.path.getsize(source)
self.operation=True
bs=4096*128
try: