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 18182

Summary: Recursive folder creation
Product: platform Reporter: Martin Roskanin <mroskanin>
Component: Data SystemsAssignee: phamernik <phamernik>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Attachments: stacktrace
java.io.IOException: Cannot create a file when that file already exists
java.io.IOException: There are no more files
org.openide.filesystems.FSException: Cannot create folder colorpicker in C:\Mato\2911\bin\mato\sampledir. (next exceptions for other folders are the same)

Description Martin Roskanin 2001-11-29 09:51:28 UTC
If you perform copy/paste operation on the same node (and this node hasn't been expanded yet) the folder will be pasted recursively until the 
exception (see attachements) occurs.

How to reproduce: (Win2000 JDK1.3)
----------------------
1. Start a dev build [29.11] 
2. Expand sampledir (DO NOT expand examples)
3. Perform Copy action on examples via popup
4. Perform Paste action on examples
Comment 1 Martin Roskanin 2001-11-29 09:58:39 UTC
Created attachment 3614 [details]
stacktrace
Comment 2 Martin Roskanin 2001-11-29 10:01:08 UTC
Created attachment 3617 [details]
java.io.IOException: Cannot create a file when that file already exists
Comment 3 Martin Roskanin 2001-11-29 10:02:41 UTC
Created attachment 3619 [details]
java.io.IOException: There are no more files
Comment 4 Martin Roskanin 2001-11-29 10:04:55 UTC
Created attachment 3620 [details]
org.openide.filesystems.FSException: Cannot create folder colorpicker in C:\Mato\2911\bin\mato\sampledir.  (next exceptions for other folders are the same)
Comment 5 rmatous 2001-11-30 15:12:57 UTC
Problem is in DataFolder.handleCopy. Added diff and reassigned to 
loaders.

cvs server: Diffing .
Index: DataFolder.java
===================================================================
RCS file: /cvs/openide/src/org/openide/loaders/DataFolder.java,v
retrieving revision 1.117.12.1
diff -r1.117.12.1 DataFolder.java
537,538d536
<         DataFolder newFolder = (DataFolder)super.handleCopy (f);
<
539a538
>         DataFolder newFolder = (DataFolder)super.handleCopy (f);
Comment 6 phamernik 2001-12-03 14:54:01 UTC
The proposed patch applied. Marking as 3.3.0_CANDIDATE.
Comment 7 phamernik 2001-12-04 12:36:36 UTC
Integrated in release330 branch as well.
Comment 8 Marian Mirilovic 2001-12-11 12:51:48 UTC
verified in [nb_release330](200112102331) &
[nb_release33](200112110331)
Comment 9 Quality Engineering 2003-07-01 16:08:27 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.