Bug 269195 - Remote can not create a file inside a cyclic link
Remote can not create a file inside a cyclic link
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Remote
Dev
All All
: P3 (vote)
: 8.2
Assigned To: Vladimir Kvashin
issues@cnd
82patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-01 09:37 UTC by Vladimir Kvashin
Modified: 2016-12-08 13:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2016-12-01 09:37:12 UTC
While investigating stack overflow (issue 268918) I found that IDE can not create a file inside a cyclic link:

Caused: java.io.FileNotFoundException: Cannot create file vkvashin@localhost:/home/vkvashin/tmp/cyclic_link/newfile2
        at org.netbeans.modules.remote.impl.fs.RemoteExceptions.createFileNotFoundException(RemoteExceptions.java:93)
        at org.netbeans.modules.remote.impl.fs.RemoteDirectory.create(RemoteDirectory.java:308)
        at org.netbeans.modules.remote.impl.fs.RemoteDirectory.createDataImpl(RemoteDirectory.java:172)
        at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.createDataImpl(RemoteLinkBase.java:311)
        at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.createDataImpl(RemoteLinkBase.java:311)
        at org.netbeans.modules.remote.impl.fs.RemoteLinkBase.createDataImpl(RemoteLinkBase.java:311)
        at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.createData(RemoteFileObjectBase.java:252)
        at org.netbeans.modules.remote.impl.fs.RemoteFileObject.createData(RemoteFileObject.java:470)
        at org.netbeans.api.templates.CreateFromTemplateImpl.defaultCreate(CreateFromTemplateImpl.java:244)
        at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:130)
        at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:92)
        at org.netbeans.api.templates.FileBuilder.build(FileBuilder.java:250)
        at org.netbeans.api.templates.FileBuilder.createFromTemplate(FileBuilder.java:351)
        at org.openide.loaders.FileEntry.createFromTemplate(FileEntry.java:155)
        at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:881)
        at org.openide.loaders.DefaultDataObject.handleCreateFromTemplate(DefaultDataObject.java:169)
        at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1597)
        at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:261)
        at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
        at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:519)
        at org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:286)
        at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:1051)
        at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:983)
        at org.openide.loaders.TemplateWizard$DefaultIterator.instantiate(TemplateWizard.java:919)
        at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605)
        at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:439)
        at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248)
        at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:160)
        at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1629)
        at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1570)
        at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:92)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2257)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
        at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Comment 1 Vladimir Kvashin 2016-12-01 10:41:35 UTC
This was done intentionally when fixing issue 258298.

But the issue that canRead() returned true for such directories, so IDE allowed to call new file creation, but it failed. 

This is now fixed on enum/r82, change set 262ecf3b03f4
Comment 2 Quality Engineering 2016-12-03 03:02:34 UTC
Integrated into 'main-silver', will be available in build *201612030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cdf7380d5506
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Fix and test for #269195 - Remote can not create a file inside a cyclic link
(transplanted from 262ecf3b03f4b52bd9e4a534e4bcebc712a8cf23)
Comment 3 soldatov 2016-12-08 13:28:53 UTC
Verified in internal NetBeans 8,2 patch 1 build.


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