Skip to content

local: Evaluate symlinks for remote root path#6014

Open
danbeibei wants to merge 1 commit intorclone:masterfrom
danbeibei:Evaluate-symlinks-for-root-path
Open

local: Evaluate symlinks for remote root path#6014
danbeibei wants to merge 1 commit intorclone:masterfrom
danbeibei:Evaluate-symlinks-for-root-path

Conversation

@danbeibei
Copy link
Copy Markdown

@danbeibei danbeibei commented Feb 26, 2022

What is the purpose of this change?

Using the move command to a destination directory which happens to be the source directory but not with the same path (with use of symlinks) results in directory content removal. The purpose is to prevent user error by detecting that source and destination are actually the same in this particular scenario.

Change description

Evaluate symlinks for the root path of local remote:
rclone already checks if the canonicalised root path are the same, this change add sylmlinks evaluation to the canonicalisation of root paths.

Was the change discussed in an issue or in the forum before?

https://forum.rclone.org/t/more-foolproof-move-command-destination-is-symlink-pointing-to-source/29468

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

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