diff --git a/download_sharepoint.py b/download_sharepoint.py index d8d4ce0..c8c4201 100644 --- a/download_sharepoint.py +++ b/download_sharepoint.py @@ -135,13 +135,10 @@ def main(): client_secret = config.get('CLIENT_SECRET') site_url = config.get('SITE_URL') drive_name = config.get('DOCUMENT_LIBRARY') - folders_to_download_str = config.get('FOLDERS_TO_DOWNLOAD') - local_path_base = config.get('LOCAL_PATH').replace('\\', os.sep) + folders_to_download_str = config.get('FOLDERS_TO_DOWNLOAD', '') + local_path_base = config.get('LOCAL_PATH', '').replace('\\', os.sep) - folders_to_download = [f.strip() for f in folders_str.split(',')] if 'FOLDERS_TO_DOWNLOAD' in config else [] - # Safeguard if FOLDERS_TO_DOWNLOAD is missing - if not folders_to_download: - folders_to_download = [f.strip() for f in folders_to_download_str.split(',')] + folders_to_download = [f.strip() for f in folders_to_download_str.split(',') if f.strip()] print(f"Connecting via Graph API (with auto-refresh and skip logic)...")