Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Kouremenos <kourem@gmail.com>2005-08-17 02:38:21 +0400
committerNikos Kouremenos <kourem@gmail.com>2005-08-17 02:38:21 +0400
commit7c2e69cf8bc9588aef71d8d2a916ef956478a632 (patch)
treec8c94f06d423a91de7a47cb195fbbc304fcb9afe
parent19845744c8183e311d015be05ff587b235d749a5 (diff)
dnd now works in windows too
-rw-r--r--src/common/helpers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/helpers.py b/src/common/helpers.py
index f1277ec32..baa087eb7 100644
--- a/src/common/helpers.py
+++ b/src/common/helpers.py
@@ -267,7 +267,9 @@ def get_file_path_from_dnd_dropped_uri(uri):
path = urllib.url2pathname(uri) # escape special chars
path = path.strip('\r\n\x00') # remove \r\n and NULL
# get the path to file
- if path.startswith('file://'): # nautilus, rox
+ if path.startswith('file:\\\\\\'): # windows
+ path = path[8:] # 8 is len('file:///')
+ elif path.startswith('file://'): # nautilus, rox
path = path[7:] # 7 is len('file://')
elif path.startswith('file:'): # xffm
path = path[5:] # 5 is len('file:')