mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix path prefix on windows
Previously, the path prefix was only set if "windows_paths" was true, regardless of OS. Now the path prefix is always set on windows and never set on other OSes.
This commit is contained in:
parent
22c2259adb
commit
eb8b915813
@ -242,7 +242,6 @@ class Crawler(ABC):
|
||||
config.default_section.working_dir() / section.output_dir(name),
|
||||
section.redownload(),
|
||||
section.on_conflict(),
|
||||
section.windows_paths(),
|
||||
)
|
||||
|
||||
@property
|
||||
|
@ -142,10 +142,9 @@ class OutputDirectory:
|
||||
root: Path,
|
||||
redownload: Redownload,
|
||||
on_conflict: OnConflict,
|
||||
windows_paths: bool,
|
||||
):
|
||||
if windows_paths:
|
||||
# Windows limits the path length to 260 for some historical reason
|
||||
if os.name == "nt":
|
||||
# Windows limits the path length to 260 for some historical reason.
|
||||
# If you want longer paths, you will have to add the "\\?\" prefix
|
||||
# in front of your path. See:
|
||||
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
|
||||
|
Loading…
Reference in New Issue
Block a user