Skip to content

Fix: move files locally - #107

Merged
Flapjacck merged 1 commit into
mainfrom
move-fix
Dec 18, 2025
Merged

Flapjacck merged 1 commit into
mainfrom
move-fix

Conversation

@Flapjacck

Copy link
Copy Markdown
Owner

This pull request enhances the file move functionality by ensuring that the underlying physical file is atomically moved on disk when a file is moved or replaced, not just its metadata. The changes introduce a new utility function for renaming (moving) files within the storage directory and update the move logic to use this function, improving data consistency and error handling during file operations.

File Move and Replacement Improvements:

  • When a file is moved or replaced, the physical file is now atomically moved on disk using the new renameFile utility, ensuring the storage reflects metadata changes and preventing inconsistencies. (move.ts, fileStorage.ts) [1] [2]

File Storage Utility Enhancements:

  • Added a new renameFile function to fileStorage.ts that securely renames (moves) a file within the storage directory, with proper error handling for missing files and failed operations. (fileStorage.ts)
  • Exported the new renameFile function from fileStorage.ts for use elsewhere in the codebase. (fileStorage.ts)

Dependency Updates:

  • Imported the new fileStorage utility in the file move controller to support the updated move logic. (move.ts)

@Flapjacck
Flapjacck merged commit a179664 into main Dec 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant