diff --git a/dist/renamer-0.5.6-py3-none-any.whl b/dist/renamer-0.5.6-py3-none-any.whl new file mode 100644 index 0000000..8bf7c72 Binary files /dev/null and b/dist/renamer-0.5.6-py3-none-any.whl differ diff --git a/pyproject.toml b/pyproject.toml index 90e5ec7..15b4880 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "renamer" -version = "0.5.5" +version = "0.5.6" description = "Terminal-based media file renamer and metadata viewer" readme = "README.md" requires-python = ">=3.11" diff --git a/renamer/screens.py b/renamer/screens.py index 8ce06e5..b60a421 100644 --- a/renamer/screens.py +++ b/renamer/screens.py @@ -179,9 +179,9 @@ Do you want to proceed with renaming? if event.button.id == "rename": try: logging.info(f"Renaming {self.old_path} to {self.new_path}") - self.old_path.rename(self.new_path) + self.old_path.rename(self.old_path.with_name(self.new_path)) # type: ignore # Update the tree node - self.app.update_renamed_file(self.old_path, self.new_path) # type: ignore + self.app.update_renamed_file(self.old_path, self.old_path.with_name(self.new_path)) # type: ignore self.app.pop_screen() except Exception as e: # Show error @@ -229,9 +229,9 @@ Do you want to proceed with renaming? # Trigger rename try: logging.info(f"Hotkey renaming {self.old_path} to {self.new_path}") - self.old_path.rename(self.new_path) + self.old_path.rename(self.old_path.with_name(self.new_path)) # type: ignore # Update the tree node - self.app.update_renamed_file(self.old_path, self.new_path) # type: ignore + self.app.update_renamed_file(self.old_path, self.old_path.with_name(self.new_path)) # type: ignore self.app.pop_screen() except Exception as e: # Show error diff --git a/uv.lock b/uv.lock index 6909e35..c79b9ac 100644 --- a/uv.lock +++ b/uv.lock @@ -342,7 +342,7 @@ wheels = [ [[package]] name = "renamer" -version = "0.5.5" +version = "0.5.6" source = { editable = "." } dependencies = [ { name = "langcodes" },