Show
Ignore:
Timestamp:
05/11/08 01:21:28 (7 months ago)
Author:
js
Message:

Fix DnD FT on Windows:
* Fix helpers.py so URL is decoded correctly.
* Fix code in roster_window.py so the \0 that's alway the last file

on win32 is ignored.

This also fixes and closes #2398.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/helpers.py

    r9585 r9610  
    586586 
    587587def get_file_path_from_dnd_dropped_uri(uri): 
    588         path = urllib.url2pathname(uri) # escape special chars 
     588        path = urllib.unquote(uri) # escape special chars 
    589589        path = path.strip('\r\n\x00') # remove \r\n and NULL 
    590590        # get the path to file 
    591         if path.startswith('file:\\\\\\'): # windows 
     591        if re.match('^file:///[a-zA-Z]:/', path): # windows 
    592592                path = path[8:] # 8 is len('file:///') 
    593593        elif path.startswith('file://'): # nautilus, rox