Skip to content

Commit

Permalink
Use shutil.move instead of Path.rename to move NSP to final path
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
rlaphoenix committed Jan 19, 2024
1 parent 43b61e0 commit 4369463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nton/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def build(window: QMainWindow) -> bool:

if save_path.exists():
save_path.unlink()
(Directories.output / f"{title_id}.nsp").rename(save_path)
shutil.move(Directories.output / f"{title_id}.nsp", save_path)

window.log.info(f"Build NSP to %s", save_path)
QMessageBox.information(
Expand Down
2 changes: 1 addition & 1 deletion nton/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def build(
if nsp_final_path.exists():
log.warning("An NSP forwarder of the same name, publisher and title ID already existed.")
nsp_final_path.unlink()
(Directories.output / f"{id_}.nsp").rename(nsp_final_path)
shutil.move(Directories.output / f"{id_}.nsp", nsp_final_path)

log.info(f"Done! The NSP has been saved to {nsp_final_path}")
finally:
Expand Down

0 comments on commit 4369463

Please sign in to comment.