Menu

#1255 NTFS Symlinks are not preserved

3.0 Series
open
nobody
Cygwin (2)
5
2020-10-26
2020-10-17
No

I have been making an installer for an application bundle that includes Cygwin.

  1. 3.06.1
  2. There is no error message.
  3. Can provide upon request, but might take a little while.
  4. Nothing is wrong with the UI

As this application is fairly complex, and symlinks are common in Linux installations, Cygwin uses them too, but they are broken with NSIS, and instead files are copied. The resulting bundle works, but is way bigger than is needed. I have tried running as administrator and with different compression options, but nothing seems to make any difference.

Has anyone else encountered an issue like this?

Discussion

  • Anders

    Anders - 2020-10-17

    If you are saying that File mystuff\cygwin\* does not preserve special NTFS attributes then yes, this is expected. NSIS does not query the file system for such things, it just opens the file for normal reading and stores the file content and path in the installer.

     
  • Hamish McIntyre-Bhatty

    Cygwin's symlinks use something called NTFS Reparse Points as symlinks (https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks, https://en.wikipedia.org/wiki/NTFS_reparse_point)

    It seems that, much like Linux symlinks, applications that aren't aware of symlinks might just end up duplicating files rather than preserving the links. Unfortunately I can't really provide any insight beyond what those links show, apart from saying that NSIS seems to duplicate files. This isn't really my area of expertise.

    I've found a Cygwin-specific workaround (using a different type of symlink), so this isn't a problem for me anymore, and I do recognise that this is definitely a corner case. That said, if I can help somehow I'll be happy to lend a hand,

     

Log in to post a comment.

MongoDB Logo MongoDB