[utils] Deprecate make_dir in favor of make_parent_dirs (#16931)

Authored by: doe1080
This commit is contained in:
doe1080
2026-06-12 22:53:58 +00:00
committed by GitHub
parent a2483524fb
commit b05b408d10
5 changed files with 28 additions and 14 deletions
+7 -2
View File
@@ -139,7 +139,7 @@ from .utils import (
join_nonempty,
locked_file,
make_archive_id,
make_dir,
make_parent_dirs,
number_of_digits,
orderedSet,
orderedSet_from_options,
@@ -2036,7 +2036,12 @@ class YoutubeDL:
raise Exception(f'Invalid result type: {result_type}')
def _ensure_dir_exists(self, path):
return make_dir(path, self.report_error)
try:
make_parent_dirs(path)
return True
except OSError as e:
self.report_error(f'Unable to create directory: {e}')
return False
@staticmethod
def _playlist_infodict(ie_result, strict=False, **kwargs):