drag and drop for windows
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import os
|
||||
from urllib.parse import urlparse
|
||||
import sys
|
||||
|
||||
|
||||
def url_to_path(url: str) -> str:
|
||||
p = urlparse(url)
|
||||
if sys.platform == 'win32' or sys.platform == 'cygwin':
|
||||
return os.path.abspath(p.path[1:])
|
||||
return os.path.abspath(os.path.join(p.netloc, p.path))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user