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.
Build: NetBeans IDE Dev (Build cnd-trunk-build-3677-on-20160920) VM: Java HotSpot(TM) 64-Bit Server VM, 25.101-b13, Java(TM) SE Runtime Environment, 1.8.0_101-b13 OS: Windows 7 User Comments: soldatov: Build "Hello CMake World" project on \\Host\folder Stacktrace: org.openide.filesystems.FileStateInvalidException at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObjWindows.createFolder(RootObjWindows.java:211) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObj.createFolder(RootObj.java:258) at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:712) at org.netbeans.modules.cnd.makeproject.MakeActionProviderImpl.onPreBuildStep(MakeActionProviderImpl.java:827) at org.netbeans.modules.cnd.makeproject.MakeActionProviderImpl.addTarget(MakeActionProviderImpl.java:487) at org.netbeans.modules.cnd.makeproject.MakeActionProviderImpl.addAction(MakeActionProviderImpl.java:468)
Created attachment 162128 [details] stacktrace
Root folder (instance of FileBasedFSWithUI) has 3 children (instances of FolderObj): \\ALEX-PC\Users E:\ C:\ But fileUtil cannot create folder "\\ALEX-PC\Users\alex\HelloCMakeWorld_1\build\Debug" in root folder.
P1 because fileUtil is a base platform utility and it must work.
Created attachment 162131 [details] work around on CND side
Integrated into 'main-silver', will be available in build *201610200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2c8555aa355b User: Alexander Simon <alexvsimon@netbeans.org> Log: work around Bug #268116 org.openide.filesystems.FileStateInvalidException at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObjWindows.createFolder (transplanted from fdab45c64cd48fab5bdbbfc095ef17cf539d673e)
I am sorry, but it not quite clear to me, what is wrong. Can please provide exact steps how to reproduce it? Is it Windows only issue? Thanks.
(In reply to Tomas Hurka from comment #6) > I am sorry, but it not quite clear to me, what is wrong. Can please provide > exact steps how to reproduce it? Is it Windows only issue? Thanks. Yes it is a Windows specific bug. FileUtils cannot create file object on local file system. Steps are: FileSystem fs; // is a local windows file system // failed to create file: FileUtil.createFolder(fs.getRoot(), "\\HOST-NAME\Users\user\tmp");
(In reply to Alexander Simon from comment #7) > (In reply to Tomas Hurka from comment #6) > > I am sorry, but it not quite clear to me, what is wrong. Can please provide > > exact steps how to reproduce it? Is it Windows only issue? Thanks. > > Yes it is a Windows specific bug. > FileUtils cannot create file object on local file system. > Steps are: > FileSystem fs; // is a local windows file system > // failed to create file: > FileUtil.createFolder(fs.getRoot(), "\\HOST-NAME\Users\user\tmp"); FileUtil.createFolder(fs.getRoot(), "\\\\HOST-NAME\\Users\\user\\tmp");
This does not look like P1 to me. >P1 because fileUtil is a base platform utility and it must work. You can use same argument on almost any platform bug. Moreover there is an easy workaround - just mount \\Host\dir as a disk X: - everything will for fine. Another fix can be done in code - do not use absolute path "\\ALEX-PC\Users\alex\HelloCMakeWorld_1\build\Debug" with filesystem root, just use fileObject representing project root directory "HelloCMakeWorld_1" and call FileUtil.createFolder(fs.getRoot(), "build\Debug"); In fact the code above is much more efficient, since it don't need to check all the directories from the root of filesystem to the project root directory. We will investigate, if the original case can be fixed.
Fixed in profiler-main changeset: 302893:7ed3d611286f user: Tomas Hurka <thurka@netbeans.org> date: Mon Mar 27 14:02:17 2017 +0200 summary: bugfix #268116, handle UNC names in FileUtil.createFolder() - use FileUtil.toFileObject() to get FileObject for \\ComputerName\sharedFolder
Integrated into 'main-silver', will be available in build *201703280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7ed3d611286f User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #268116, handle UNC names in FileUtil.createFolder() - use FileUtil.toFileObject() to get FileObject for \\ComputerName\sharedFolder
https://netbeans.org/bugzilla/show_bug.cgi?id=268116 Changesets: http://hg.netbeans.org/releases/rev/b97791ab88b8 # bugfix #268116, handle UNC names in FileUtil.createFolder() - use FileUtil.toFileObject() to get FileObject for \\ComputerName\sharedFolder