This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 171434 - sftp: symbolic links are not preserved when uploading
Summary: sftp: symbolic links are not preserved when uploading
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: RemoteFS (show other bugs)
Version: 6.x
Hardware: PC All
: P1 blocker with 5 votes (vote)
Assignee: remotefs@contrib
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 19:40 UTC by geckoneer
Modified: 2016-09-24 12:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geckoneer 2009-09-03 19:40:53 UTC
I have a remote Linux server and locally Windows XP. Some of the files on the server are actually symbolic links which
point to other files.
When I edit these files and upload (for example, with "upload on save" feature turned on) symbolic link is removed and
"normal" file is created. 
The normal behavior would be to preserve the symbolic link on the remote side and change the actual file. Note that
there may be several links in a chain :)

Also, on Windows Vista and later it would be great to create symbolic links locally when making a download action (if
they point to the file which is within the locally accessible tree). An option how to handle the symbolic links would
also be great.

See: http://msdn.microsoft.com/en-us/library/aa365680%28VS.85%29.aspx
Comment 1 blako 2009-10-29 05:05:10 UTC
Confirmed for 6.8 M2.

Have increased priority as this is a destructive bug that is deleting the original file system structure. 
When the editor downloads a filesytem, then uploads it again, it treats symlinks as files or folders instead of 
retaining the knowledge that they were symlinks.  



Additionally, netbeans is also failing on the following structure

/home/user/public_html/symLinkedFolder -> /home/anotherFolder/symLinkDestination

if Netbeans has access to public_html then it fails to download the symlink "symLinkedFolder". 

I'd say this is probably related to the fact that the IDE is downloading a symlink as a file/folder instead of as a 
symLink.
Comment 2 kritz 2009-12-20 15:18:16 UTC
It gets even worse. When you just download the sources from the remote server, NetBeans will perform some kind of two way synchronization. So your symlinks will be destroyed by just downloading the sources.
Comment 3 ahildoer 2011-03-24 21:45:16 UTC
I can confirm this behavior still exists in 7.0 beta 2
Comment 4 swilk 2011-07-09 12:10:04 UTC
It would be great if this feature were aware of svn property "svn:special". This property is set on symbolic links which came from svn repository, so it would be possible to recreate the symbolic link o remote file system based on the content of the checked out / updated symlink. 

See http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.7
Comment 5 ahildoer 2012-02-23 17:08:20 UTC
I can confirm symlinks are not working correctly for SFTP on Netbeans 7.1 final on Mac OS X Lion.

One of the projects I work on has a symlink to an external library that is outside of the code base. The destination of that symlink does not exist on my workstation, but does exist on production and development servers. So, rather than changing my symlink to a normal file containing the destination of the symlink, the symlink is being deleted completely.