Skip to content

Commit

Permalink
Move copying temporal download files rather than renaming them
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Jun 14, 2022
1 parent 9239396 commit 26bb67e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.22
current_version = 0.0.23

[bumpversion:file:blender_downloader/__init__.py]

Expand Down
8 changes: 6 additions & 2 deletions blender_downloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__author__ = "mondeja"
__description__ = "Multiplatform Blender portable release downloader script."
__title__ = "blender-downloader"
__version__ = "0.0.22"
__version__ = "0.0.23"

QUIET = False

Expand Down Expand Up @@ -777,7 +777,11 @@ def download_release(download_url, output_directory, quiet=False):
sys.exit(1)

# move from temporal directory to the real output path
os.rename(tmp_output_filepath, output_filepath)
#
# use `shutil.move` instead of `os.rename` to be able to
# move files between different hard drives, see:
# https://stackoverflow.com/a/21116654/9167585
shutil.move(tmp_output_filepath, output_filepath)

return output_filepath

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = blender_downloader
version = 0.0.22
version = 0.0.23
description = Multiplatorm Blender downloader.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 26bb67e

Please sign in to comment.