Ensure folder exists before copying the file

This commit is contained in:
Hoang Hong Quan
2024-10-14 03:43:22 +07:00
parent 6f5b251f1d
commit 5be338b5aa

View File

@@ -46,6 +46,7 @@ class Updater:
for path, type in file_paths:
source = os.path.join(target_dir, path)
destination = source.replace(target_dir, os.path.dirname(os.path.realpath(__file__)))
self.utils.create_folder(os.path.dirname(destination))
shutil.move(source, destination)
if ".command" in os.path.splitext(path)[-1] and os.name != "nt":
self.run({