Skip to content

fix compiling errors in windows - #6

Open
SmuSmu wants to merge 2 commits into
acidnik:masterfrom
SmuSmu:master
Open

fix compiling errors in windows#6
SmuSmu wants to merge 2 commits into
acidnik:masterfrom
SmuSmu:master

Conversation

@SmuSmu

@SmuSmu SmuSmu commented Oct 9, 2020

Copy link
Copy Markdown

tiny fixes to avoid compiling errors

Comment thread src/copy.rs

if is_link {
let link_dest = std::fs::read_link(&p).unwrap();
#[cfg(target_os = "unix")]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't know much about windows file system, but should't it be https://doc.rust-lang.org/std/os/windows/fs/fn.symlink_file.html for windows instead of just skipping?

@SmuSmu

SmuSmu commented Oct 28, 2020

Copy link
Copy Markdown
Author

Can you tell me the target of the symlink feature? Should there be a symlink in the targetfolder pointing to the original symlink target. Or a realfile with the name of the original symlinkname? In the moment It seams that it will copy the symlink target file with the original filename. Regardless if I use std::os::windows::fs::symlink_file or not.

That fits to my expectation that windows symlinks are crap. mostly they never work as expected. And after 15 years as windows admin I only tried it 2 times. Never successfully. My opinion is to skip this in windows because feature is not working.

@SmuSmu
SmuSmu requested a review from acidnik October 29, 2020 10:52
@acidnik

acidnik commented Oct 29, 2020

Copy link
Copy Markdown
Owner

I trust your expertise, and I'm ok with skip symlinks at all at windows. So, should I merge this PR with symlink_file, or will you remove it?

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.

2 participants