mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 14:28:38 -04:00
In --links mode the local backend checked that a source name stayed inside the destination root and only then removed the ".rclonelink" suffix from the resulting OS path. A source entry called "...rclonelink" passed the check and was then trimmed to "..", so the object addressed the parent of the destination the user chose. Writing the content of such an entry was already refused, as it is done through an os.Root, but metadata was not: with --metadata rclone rewrote the timestamps, ownership and extended attributes of the directory above the destination from values supplied by the source. The suffix is now removed from the remote name before it is joined to the root, so the containment check applies to the name that is actually used. A translated link must also leave a real native file name once the suffix is removed. A regular file whose name is exactly ".rclonelink" (or "..rclonelink" or "...rclonelink") is not a valid translated link and is now skipped in directory listings.