Add support for folder paths longer than 255 characters (Windows)

master
Dan Howe 6 years ago
parent a61ae3be85
commit 1e27a4d77f

@ -77,6 +77,11 @@ def get_document_list(mod_id, output_dir):
# Create modification folder
mod_dir = os.path.join(output_dir, project_name, mod_name)
try:
os.makedirs(mod_dir, exist_ok=True)
except FileNotFoundError:
# Fix destination path if longer than 255 characters (Windows only)
mod_dir = '\\\\?\\' + os.path.abspath(mod_dir)
os.makedirs(mod_dir, exist_ok=True)
# Add note if no documents are found on portal

Loading…
Cancel
Save