summaryrefslogtreecommitdiff
path: root/mat-gui
diff options
context:
space:
mode:
authorjvoisin2011-12-05 16:39:04 +0100
committerjvoisin2011-12-05 16:39:04 +0100
commitdbafbe86ea041525c38370812d6b0a01d2e48eba (patch)
tree8d78f50d195279cc10a34c1501f3f1d68ef2732d /mat-gui
parent697cf6187671c92bf9a81572e5329a1dea3c21e7 (diff)
Correct handling of filenames with spaces in mat-gui
Diffstat (limited to 'mat-gui')
-rwxr-xr-xmat-gui4
1 files changed, 3 insertions, 1 deletions
diff --git a/mat-gui b/mat-gui
index 9ea49b2..3110d23 100755
--- a/mat-gui
+++ b/mat-gui
@@ -15,6 +15,7 @@ import os
15import sys 15import sys
16import mimetypes 16import mimetypes
17import xml.sax 17import xml.sax
18import urllib2
18 19
19from mat import mat 20from mat import mat
20from mat import strippers 21from mat import strippers
@@ -460,7 +461,7 @@ non-anonymised) file to output archive'))
460 It basically add files. 461 It basically add files.
461 ''' 462 '''
462 urls = selection.data.strip('\r\n\x00') # strip stupid characters 463 urls = selection.data.strip('\r\n\x00') # strip stupid characters
463 cleaned_urls = map(self.clean_draged_file_path, urls.split()) 464 cleaned_urls = map(self.clean_draged_file_path, urls.split('\n'))
464 task = self.populate(cleaned_urls) 465 task = self.populate(cleaned_urls)
465 gobject.idle_add(task.next) # asynchrone processing 466 gobject.idle_add(task.next) # asynchrone processing
466 467
@@ -469,6 +470,7 @@ non-anonymised) file to output archive'))
469 Since the dragged urls are ugly, 470 Since the dragged urls are ugly,
470 we need to process them 471 we need to process them
471 ''' 472 '''
473 url = urllib2.unquote(url) # unescape stupid chars
472 if url.startswith('file:\\\\\\'): # windows 474 if url.startswith('file:\\\\\\'): # windows
473 return url[8:] # 8 is len('file:///') 475 return url[8:] # 8 is len('file:///')
474 elif url.startswith('file://'): # nautilus, rox 476 elif url.startswith('file://'): # nautilus, rox