aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-10-09 16:16:22 +0200
committerPapoteur <papoteur@mageia.org>2018-10-09 16:16:22 +0200
commite5e7772263568e1b6bb1eb7843d57111b43ebb87 (patch)
tree415b94c671c720985bbf1db99990fa39f67628b5 /lib
parentd047704b5deccad5704750ba395a6df1a023ce00 (diff)
downloadisodumper-e5e7772263568e1b6bb1eb7843d57111b43ebb87.tar
isodumper-e5e7772263568e1b6bb1eb7843d57111b43ebb87.tar.gz
isodumper-e5e7772263568e1b6bb1eb7843d57111b43ebb87.tar.bz2
isodumper-e5e7772263568e1b6bb1eb7843d57111b43ebb87.tar.xz
isodumper-e5e7772263568e1b6bb1eb7843d57111b43ebb87.zip
Secure selecting files
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 18e596a..fa1e8f8 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -47,8 +47,8 @@ import time
#log.setLogFileName("isodumper.log")
#log.enableDebugLogging( True )
-import os, re
-import io
+import os
+import re
import gettext
from subprocess import call, Popen, PIPE
from pydbus import SystemBus
@@ -152,13 +152,6 @@ class IsoDumper(object):
self.ima.setEnabled()
self.backup_select.setEnabled()
break
-
-
- def backup_sel(self):
- if self.backup_bname.get_current_folder_uri() == None :
- self.backup_bname.set_current_folder_uri('file://'+os.path.expanduser('~'))
- self.backup_bname.set_current_name(self.device_name+".img")
- self.choose.run()
def backup_choosed(self):
# Add .img if not specified
@@ -622,8 +615,7 @@ NTFS or ext. You can specify a volume name and the format in a new dialog box.<B
self.close()
break
if event.widget() == self.ima:
- default = 'file://'+os.path.expanduser('~')
- self.img_name=yui.YUI.app().askForExistingFile(default,"*.iso *.img",self.ChooseImage)
+ self.img_name=yui.YUI.app().askForExistingFile("","*.iso *.img",self.ChooseImage)
self.ima.setLabel(os.path.basename(self.img_name))
self.dialog.recalcLayout()
self.writebt.setEnabled()
@@ -637,7 +629,7 @@ NTFS or ext. You can specify a volume name and the format in a new dialog box.<B
self.backup_go()
self.restore()
if event.widget() == self.backup_select:
- self.backup_img_name=yui.YUI.app().askForSaveFileName('file:///home/'+self.user,"*.img",_("Backup to:"))
+ self.backup_img_name=yui.YUI.app().askForSaveFileName("","*.img",_("Backup to:"))
if self.backup_img_name != '':
self.backup_choosed()
if event.widget() == self.formatbt: