Copying Cygwin symlinks through Windows Explorer won't make them working

0

Given two paths with the same content:

D:\dir1\file1
D:\dir1\symlink1-to-file1

D:\dir2\file1
D:\dir2\symlink1-to-file1

If I create D:\dir2\symlink1-to-file1 by windows-copying it from D:\dir1\symlink1-to-file1, the link won't work and the file command will output :

D:\dir2\symlink1-to-file1: data

Why ?

Amessihel

Posted 2017-10-25T10:54:59.270

Reputation: 163

Because that's not how symlinks work. – DavidPostill – 2017-10-25T11:05:50.980

Ah? I believed Cygwin's links were just binary files for Windows (although they are marked as "system" files). – Amessihel – 2017-10-25T11:08:17.110

Please read Enable native NTFS symbolic links for Cygwin

– DavidPostill – 2017-10-25T11:11:34.633

Answers

0

Check file attribute with CMD command attrib

https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks

if the default plain file symlink type is lacking its DOS SYSTEM bit, or if the shortcut file is lacking the DOS READONLY attribute, they are not recognized as symlink.

matzeri

Posted 2017-10-25T10:54:59.270

Reputation: 1 662