diff options
| author | 2021-12-30 01:56:51 -0500 | |
|---|---|---|
| committer | 2021-12-30 01:56:51 -0500 | |
| commit | 6a849c995173dee7ec29ae2191120bb3a1d74405 (patch) | |
| tree | b04906295296f50556f461e443a4c7633afa4b6d /gallery_dl/path.py | |
| parent | 6a387c1b3e40110ca315d5a4d260298fa5aa3eb6 (diff) | |
| parent | 7bc30b43b70556630b4a93c03fefc0d888e3d19f (diff) | |
Update upstream source from tag 'upstream/1.20.0'
Update to upstream version '1.20.0'
with Debian dir f271e8ffa4e8d9b8e41546097fc4a4e161e73f8f
Diffstat (limited to 'gallery_dl/path.py')
| -rw-r--r-- | gallery_dl/path.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gallery_dl/path.py b/gallery_dl/path.py index 12ce8ad..9e9e983 100644 --- a/gallery_dl/path.py +++ b/gallery_dl/path.py @@ -177,8 +177,11 @@ class PathFormat(): self.directory = directory = self.basedirectory if WINDOWS: - # Enable longer-than-260-character paths on Windows - directory = "\\\\?\\" + os.path.abspath(directory) + # Enable longer-than-260-character paths + if directory.startswith("\\\\"): + directory = "\\\\?\\UNC\\" + directory[2:] + else: + directory = "\\\\?\\" + os.path.abspath(directory) # abspath() in Python 3.7+ removes trailing path separators (#402) if directory[-1] != sep: |
