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 225991 - Recursive symlinks & copy? FileNotFoundException: Can't read Baixades/jpgraph-3.5.0b1/src/Examples/.../Examples/jpgraph
Summary: Recursive symlinks & copy? FileNotFoundException: Can't read Baixades/jpgraph...
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Jaroslav Havlin
Depends on: 237882
  Show dependency tree
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
Exception Reporter: 198502

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

Stacktrace: 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(
   at org.openide.filesystems.FileUtil.copyFileImpl(
   at org.openide.filesystems.FileObject.copy(
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.copy(
   at org.openide.loaders.FileEntry.copy(
   at org.openide.loaders.MultiDataObject.handleCopy(
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.