Use pathclass.Path.makedirs.
This commit is contained in:
parent
a05d34ea9e
commit
025c8d51a3
1 changed files with 2 additions and 2 deletions
|
@ -289,7 +289,7 @@ def copy_dir(
|
|||
raise DestinationIsDirectory(destination_file)
|
||||
|
||||
if not dry_run:
|
||||
os.makedirs(destination_file.parent.absolute_path, exist_ok=True)
|
||||
destination_file.parent.makedirs(exist_ok=True)
|
||||
|
||||
copied = copy_file(
|
||||
source_file,
|
||||
|
@ -434,7 +434,7 @@ def copy_file(
|
|||
if callback_pre_copy(source, destination, dry_run=dry_run) is BAIL:
|
||||
return [destination, 0]
|
||||
|
||||
os.makedirs(destination.parent.absolute_path, exist_ok=True)
|
||||
destination.parent.makedirs(exist_ok=True)
|
||||
|
||||
def handlehelper(path, mode):
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue