Ticket #2398: patch

File patch, 0.6 kB (added by nk, 2 years ago)

untested stuff (I don't have pygtk running in windows for python25!). when I can test and fix, I must also update http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.031.htp

  • src/common/helpers.py

     
    442442                exec_command(command) 
    443443 
    444444def get_file_path_from_dnd_dropped_uri(uri): 
     445        # if in windows AND we somehow get uri not starting with /// 
     446        if os.name == 'nt' and not uri.startswith('///'): 
     447                pos = uri.find('///') 
     448                uri = uri[pos:] 
    445449        path = urllib.url2pathname(uri) # escape special chars 
    446450        path = path.strip('\r\n\x00') # remove \r\n and NULL 
    447451        # get the path to file