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 256500 - Bug recognizing and creating folders starting with "." (dot) character
Summary: Bug recognizing and creating folders starting with "." (dot) character
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 8.2
Hardware: PC Windows 8.1
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-10 15:04 UTC by AlmightyR
Modified: 2015-11-22 12:55 UTC (History)
0 users

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 AlmightyR 2015-11-10 15:04:02 UTC
The IDE has a bug on recognizing folders with names beginning with '.' (dot) character.

I strongly suspect this fail to recognize such folders is directly related to, or outright causes a second bug in the creation of folders with such names through the IDE, in which the IDE successfully creates the folder, but, probably due to failure in recognizing the creation as successful, maintains the folder-creation window.

Note: At least in windows, a folder can successfully be created with name starting with a dot if you end the name with a dot.

==========

How to reproduce folder recognition failure bug:
1) Open NetBeans.
2) Create a project.
3) Using the system's (in my case, Windows 8.1 x64) file explorer, navigate to the project's folder.
4) Create a new folder called ".foldername.", where the ending dot allows for the folder name to start with a dot, as stated in the note, and where "foldername" is whatever valid folder name you want.
5) Go back to the NetBeans window. The folder is not recognized and does not appear in either "Projects" or "Files" tabs' files.

==========

How to reproduce folder creation bug:
1) Follow steps 1 and 2 of the 'recognition' bug; or use (now) existing project.
2) Go to either "Projects" or "Files" tab.
3) Right-click project source folder, then "New"->("Other..."->)"Folder..."
4) Create a folder similarly to step 4 of the 'recognition' bug (this time within NetBeans).
  4.1) Name the folder ".foldername.", for same reasons.
  4.2) Click "Finish".
5) The "New Folder" window flickers or "restarts", or an error/warning message at the bottom gets briefly displayed (flickers), and the "New Folder" window remains open.
6) Click "Cancel" on the "New Folder" window.
7) Verify that the folder is not displayed on the "Project" and/or"Files" tabs.
8) Using the system's (in my case, Windows 8.1 x64) file explorer, navigate to the project's folder.
9) The folder was actually successfully created.
  9.1) The folder is not recognized by, and therefore not displayed in, NetBeans.
  9.2) The "New Folder" window's "Finish" button creates the file (as it should), but fails to actually close or "finish" (because it's exit condition is not met [?]), and does not display any error messages before or after clicking "Finish" because the folder name is actually valid (and even gets created, albeit not recognized).
Comment 1 Jiri Prox 2015-11-10 15:29:14 UTC
What type of project do you use?
Any exception in the log?

I've tired this with Java project and HTML project and it worked fine.

Please also check the values in Options -> Miscellaneous -> Files
Comment 2 AlmightyR 2015-11-10 16:02:31 UTC
The original test project was of type "HTML5 Application" (because I was working with Meteor, which uses these folder names); and I also tested with "Java Application" as well, and the bug persists.
Comment 3 AlmightyR 2015-11-10 16:08:01 UTC
I don't know which values in "Options -> Miscellaneous -> Files" you are talking about, but they are all unchanged from NetBeans' default.
Comment 4 AlmightyR 2015-11-10 16:11:54 UTC
Log message:
msg
Caused: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot create folder .bugtest. in folder C:/Users/Rodrigo/Documents/Projects/Web/BugTest.
	at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:118)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createFolderImpl(FolderObj.java:278)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$2.call(FolderObj.java:324)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$2.call(FolderObj.java:322)
	at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:120)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createFolder(FolderObj.java:327)
	at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:723)
	at org.openide.loaders.FileEntry$Folder.createFromTemplate(FileEntry.java:427)
	at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:893)
	at org.openide.loaders.DataFolder.handleCreateFromTemplate(DataFolder.java:860)
	at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1526)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:641)
	at org.openide.loaders.DataObjectPool.runAtomicActionSimple(DataObjectPool.java:229)
	at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:995)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:930)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:910)
	at org.netbeans.modules.project.ui.NewFileIterator.instantiate(NewFileIterator.java:216)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1046)
	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:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
ALL [null]: Cannot create folder .bugtest. in folder C:/Users/Rodrigo/Documents/Projects/Web/BugTest.
Comment 5 Jaroslav Havlin 2015-11-13 11:49:26 UTC
I think that file and folder names beginning with a dot are OK, but files ending with a dot are invalid in Windows OS.

Or can you create a file ending with a dot in Windows Explorer, or in command line?
Comment 6 AlmightyR 2015-11-22 12:55:21 UTC
@Jaroslav AFAIK you need an ending dot to create folders starting with a dot; the ending dot gets automatically dropped and disappears upon the execution/consolidation of the creation/renaming.

For example, if you create a folder, and type ".test" in the name, when you confirm it, it gives an error. I found no official explanations for this, but I assume it's because the file-system can't distinguish if the dot is part of the file/dir name, or if it's the separator for a file-extension.

If, however, you type ".test.", and confirm it, the folder gets created with the name ".test". Again, no official explanations, but I assume it's because the file-system can then distinguish that the initial dot is part of the name.

All I know that the support for files/folders starting with dot is there, is intentional, is usually used for hidden or special files and folders, and that this is how to use it.