You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one of the file entries being copied by fs_extra::dir::copy happens to be a symlink to a directory, then that symlink is converted to a real directory as part of copying, resulting in (a) duplicate file contents in the destination directory, (b) non-identical contents between source and destination (which defeats the point of copying a directory verbatim).
Note: Symlinks to files are preserved, this is just about symlinks that target directories.
Steps to reproduce
Using fs_extra = "=1.2.0" with rustc 1.63.0-beta.3 on macOS 12.4, run the following:
Any sense of whether or not this will get addressed? We're using dir::copy to copy the contents of a MacOS application bundle, which contains directory symlinks and requires symlink preservation for codesigning.
Summary
If one of the file entries being copied by
fs_extra::dir::copy
happens to be a symlink to a directory, then that symlink is converted to a real directory as part of copying, resulting in (a) duplicate file contents in the destination directory, (b) non-identical contents between source and destination (which defeats the point of copying a directory verbatim).Note: Symlinks to files are preserved, this is just about symlinks that target directories.
Steps to reproduce
Using
fs_extra = "=1.2.0"
with rustc1.63.0-beta.3
on macOS 12.4, run the following:Expected
The contents of
source/
anddestination/
to be identical, and for any symlinks targetting directories to be preserved as symlinks.Actual
The
source/
anddestination/
directories have different contents, with the symlinked directory now being a real directory containing duplicate files.Source:
Destination:
The text was updated successfully, but these errors were encountered: