diff --git a/major_projects_grabber/major_projects_grabber.py b/major_projects_grabber/major_projects_grabber.py index 21e62ef..69f349b 100644 --- a/major_projects_grabber/major_projects_grabber.py +++ b/major_projects_grabber/major_projects_grabber.py @@ -77,7 +77,12 @@ def get_document_list(mod_id, output_dir): # Create modification folder mod_dir = os.path.join(output_dir, project_name, mod_name) - os.makedirs(mod_dir, exist_ok=True) + 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 if not folders: