Bug 225991 - Recursive symlinks & copy? FileNotFoundException: Can't read Baixades/jpgraph-3.5.0b1/src/Examples/.../Examples/jpgraph
Recursive symlinks & copy? FileNotFoundException: Can't read Baixades/jpgraph...
Product: platform
Classification: Unclassified
Component: Filesystems
All All
: P3 with 1 vote (vote)
: 8.1
Assigned To: Jaroslav Havlin
Depends on: 237882
  Show dependency treegraph
Reported: 2013-02-11 17:29 UTC by Exceptions Reporter
Modified: 2015-02-04 03:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT

stacktrace (45.12 KB, text/plain)
2013-02-11 17:29 UTC, Exceptions Reporter
Proposed Patch (7.24 KB, patch)
2013-11-04 15:06 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-02-11 17:29:24 UTC
This bug was originally marked as duplicate of bug 198082, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: OpenJDK Client VM, 20.0-b12, OpenJDK Runtime Environment, 1.6.0_24-b24
OS: Linux

java.io.FileNotFoundException: Can't read /home/joan/Baixades/jpgraph-3.5.0b1/src/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph/Examples/jpgraph
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:171)
   at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:763)
   at org.openide.filesystems.FileObject.copy(FileObject.java:154)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.copy(BaseFileObj.java:255)
   at org.openide.loaders.FileEntry.copy(FileEntry.java:76)
   at org.openide.loaders.MultiDataObject.handleCopy(MultiDataObject.java:515)
Comment 1 Exceptions Reporter 2013-02-11 17:29:26 UTC
Created attachment 131257 [details]
Comment 2 Jaroslav Tulach 2013-07-08 13:37:07 UTC
It might help if the copy operation could detected symlinks and instead of copying it, rather recreated it somehow.
Comment 3 Jaroslav Havlin 2013-11-04 15:06:45 UTC
Created attachment 141838 [details]
Proposed Patch

> It might help if the copy operation could detected symlinks and instead of
> copying it, rather recreated it somehow.
It is not clear how the symlinks should be recreated (use the same 
relative/absolute target path, or create link to source link?).

We also cannot always assume that symbolic links should not be followed.

The proposed patch simply tries to detect problematic recursive symbolic links
and skips them.
Comment 4 Jaroslav Havlin 2013-11-04 15:13:39 UTC
Please note that the attached patch doesn't work with Windows junctions,
Files.isSymbolicLink(pathToJunction) returns false. Symlinks created e.g. with
command "mklink" work correctly.
Comment 5 Quality Engineering 2015-02-04 03:32:37 UTC
Reported for 7.3.x or earlier, no new info since then -> closing as worksforme, please reopen in case you see it.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo