diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-09 10:11:25 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-09 10:11:25 +0530 |
commit | 4abea8ca0af0773db9fb2372b272d497bd77b207 (patch) | |
tree | ca87ca276b8f7585163972c04541c5c25c794ab2 /yt_dlp/utils.py | |
parent | d46a3e7a127654b7537b0ab537f8c08ba16862ff (diff) |
[utils] `sanitize_path`: Fix when path is empty string
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 84b2603df..ba9566cab 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -778,7 +778,7 @@ def sanitize_path(s, force=False): for path_part in norm_path] if drive_or_unc: sanitized_path.insert(0, drive_or_unc + os.path.sep) - elif force and s[0] == os.path.sep: + elif force and s and s[0] == os.path.sep: sanitized_path.insert(0, os.path.sep) return os.path.join(*sanitized_path) |