Skip to content

Fix moving files/directories between mount points#80

Merged
andrius-puksta-sensmetry merged 2 commits intomainfrom
ap/fix-move
Oct 21, 2025
Merged

Fix moving files/directories between mount points#80
andrius-puksta-sensmetry merged 2 commits intomainfrom
ap/fix-move

Conversation

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

Logic:

  • try std::fs::rename
  • if it succeeds, done
  • if it fails:
    • if src is file, copy file
    • if src is dir, recursively copy it
  • delete src

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator Author

Fixed and tested locally.

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Copy link
Copy Markdown
Member

@tilowiklundSensmetry tilowiklundSensmetry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work!

@andrius-puksta-sensmetry andrius-puksta-sensmetry merged commit 4733d73 into main Oct 21, 2025
39 checks passed
@andrius-puksta-sensmetry andrius-puksta-sensmetry deleted the ap/fix-move branch October 21, 2025 12:58
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.

Temporary files are moved using fs::rename

2 participants