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 236930

Summary: MasterFs fails to add filesystem watch for project located under drive root(Example: W:\) on Windows
Product: platform Reporter: victork
Component: FilesystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal Keywords: NETFIX, PATCH_AVAILABLE
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Proposed patch for the bug. Suggesting review of NetBeans Dev Team.

Description victork 2013-10-09 10:12:53 UTC
Created attachment 140935 [details]
Proposed patch for the bug. Suggesting review of NetBeans Dev Team.

For project located directly in the root of the drive(For example Network Drive)
masterfs fails to add a watch to the system resulting in the following errors in the log:

WARNING [org.netbeans.modules.masterfs.watcher.Watcher]: Cannot add filesystem watch for W:/: java.io.IOException: Unable to open null: 3

Patch for the problem is attached(Algorithm used to find the 'root' of the 'path' didn't count the special case there 'path' itself is an root which is shorter in length than an assumed minimum.
Comment 1 Jaroslav Havlin 2013-10-18 13:41:39 UTC
http://hg.netbeans.org/core-main/rev/297c438938f9
Fixed.

I've also added logging of an info message, as registering listener for drive root
can be problematic in some cases.

Thank you very much for reporting and for the patch!
Comment 2 Quality Engineering 2013-10-19 03:59:44 UTC
Integrated into 'main-silver', will be available in build *201310190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/297c438938f9
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #236930: MasterFs fails to add filesystem watch for project located under drive root on Windows