Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2022-06-30 12:47:23 +0300
committerGhostkeeper <rubend@tutanota.com>2022-06-30 12:48:56 +0300
commit254edfd3ec623cba380a4481a78adb0c5a5a4102 (patch)
tree25d96f24f831e88a0f95a84f87f6a88ff431b3bc /packaging
parent970e0d8395ee399d3541885005e7b83982cf84d2 (diff)
Fix deleting old files if they exist
Rmdir crashes when it needs to delete just one file, annoyingly. Contributes to issue CURA-9409.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/create_appimage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/packaging/create_appimage.py b/packaging/create_appimage.py
index e2de703dc4..6ae0c64aa5 100644
--- a/packaging/create_appimage.py
+++ b/packaging/create_appimage.py
@@ -17,7 +17,7 @@ def build_appimage():
copy_metadata_files()
try:
- shutil.rmtree(os.path.join(dist_path, appimage_filename)) # Ensure any old file is removed, if it exists.
+ os.remove(os.path.join(dist_path, appimage_filename)) # Ensure any old file is removed, if it exists.
except FileNotFoundError:
pass # If it didn't exist, that's even better.
@@ -38,6 +38,7 @@ def copy_metadata_files():
packaging_dir = os.path.dirname(__file__)
for source, dest in copied_files.items():
+ print("Copying", os.path.join(packaging_dir, source), "to", os.path.join(dist_path, dest))
shutil.copyfile(os.path.join(packaging_dir, source), os.path.join(dist_path, dest))
# Ensure that AppRun has the proper permissions: 755 (user reads, writes and executes, group reads and executes, world reads and executes).