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 203636 - FileUtil.createFolder(FileObject folder, String name) cannot create folder
Summary: FileUtil.createFolder(FileObject folder, String name) cannot create folder
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 203507
  Show dependency tree
 
Reported: 2011-10-13 09:35 UTC by Alexander Simon
Modified: 2011-11-24 15:59 UTC (History)
2 users (show)

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 Alexander Simon 2011-10-13 09:35:51 UTC
Bug reproduced in following conditions:
- the folder is root of widows FS
- the name is absolute path
- driver of name is not equal system driver and driver of user dir and driver of NB home.
- there are no access to driver of name in IDE before.

The simplest steps:
- Windows have two drives (for example C: and D:)
- System drive is C:
- Netbeans started from C:/...
- User dir in C:/...
Invoking of FileUtil.createFolder(windowsFileSystemRoot, "D:/tmp") produces:
org.openide.filesystems.FileStateInvalidException
    at
org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObjWindows.createFolder(RootObjWindows.java:194)
    at
org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObj.createFolder(RootObj.java:258)
    at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:864)

See also Bug #203507
Comment 1 Vladimir Voskresensky 2011-10-13 09:41:29 UTC
I suppose the same issue is with FileUtil.createData(FileObject folder, String name), right?
Comment 2 Quality Engineering 2011-10-17 20:05:35 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/6c695bde1d46
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #203507 Can't create project in Samba Remote mode (WindowsXP->Solaris)
- work around of Bug #203636
(transplanted from 22967fdc62415c91cf63823194a3f11bd679986f)
Comment 3 Jaroslav Tulach 2011-10-25 05:53:00 UTC
Why the report talks about Samba? Is this issue reproducible just with regular Windows drives or not?
Comment 4 Alexander Simon 2011-10-25 06:21:26 UTC
(In reply to comment #3)
> Why the report talks about Samba? Is this issue reproducible just with regular
> Windows drives or not?
Yes, reproducible
Comment 5 Jaroslav Tulach 2011-11-11 16:26:43 UTC
OK, reproduced.
Comment 6 Jaroslav Tulach 2011-11-12 19:03:31 UTC
ergonomics#178ae9aa4821
Comment 7 Quality Engineering 2011-11-14 15:44:19 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/178ae9aa4821
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #203636: Make sure factory is created for each root
Comment 8 Tomas Danek 2011-11-24 15:59:22 UTC
verified.

Product Version: NetBeans IDE 7.1 RC1 (Build 201111232200)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Users\tester\.netbeans\7.1rc1
Cache directory: C:\Users\tester\.netbeans\7.1rc1\var\cache