summaryrefslogtreecommitdiffstats
path: root/gallery_dl/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/path.py')
-rw-r--r--gallery_dl/path.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gallery_dl/path.py b/gallery_dl/path.py
index 9e9e983..15db67f 100644
--- a/gallery_dl/path.py
+++ b/gallery_dl/path.py
@@ -178,10 +178,11 @@ class PathFormat():
if WINDOWS:
# Enable longer-than-260-character paths
+ directory = os.path.abspath(directory)
if directory.startswith("\\\\"):
directory = "\\\\?\\UNC\\" + directory[2:]
else:
- directory = "\\\\?\\" + os.path.abspath(directory)
+ directory = "\\\\?\\" + directory
# abspath() in Python 3.7+ removes trailing path separators (#402)
if directory[-1] != sep: