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 214259 - Moving project (folder structure) into itself creates infinite loop and endless subfolders
Summary: Moving project (folder structure) into itself creates infinite loop and endle...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.1
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 217551 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-15 08:42 UTC by Garfield
Modified: 2012-11-22 08:31 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 Garfield 2012-06-15 08:42:02 UTC
Hello,

This issue has happened on NetBeans 7.1 (all automatic updates until June 14th) on Windows 7 x64 with Java 1.7.5 when working with a Java SE project.

Be carefully when testing this issue (see below).

The project folder of the Java project was c:\Users\Jens\Java\Outlook.

I wanted to move the project one level down into itself, using the same folder name. That is, requested structure was c:\Users\Jens\Java\Outlook\Outlook

I started the command Move Project (Projects Tab, right click on the project, 'Move...'). I entered the new Project location as written above (the desired subfolder has not existed so far) and clicked on the 'Move' button.

A dialog like 'Moving project' appears. This dialog hangs and nothing visible happens anymore. (I have a solid state disk, that is, I do not hear disk drive activity.)

When having a look at my disk drive I realized that NetBeans started to put endless subfolders into the project folder (c:\Users\Jens\Java\Outlook\Outlook\Outlook\Outlook\Outlook....)

I killed NetBeans using the task manager.

But in the time I am waiting NetBeans has already created that many subfolders that the path exceeds the maximum path length of Windows 7 so that it was no longer possible to just delete the up most folder.

I needed to write a small Java application which moves the second folder into a working folder, delete the first folder and iterates this until all folders could be deleted  (deleted more than 200 subfolders...).

Hope this is reproducible, I do not want to repeat this, as you can imagine...

Feel free to contact me in case of further questions.

Kind regards

Jens
Comment 1 Milos Kleint 2012-06-19 08:39:05 UTC
reassigning the filesystems. The project folder structure copy/move is perfomed
by  using FileObject.move/copy methods. Please see
DefaultProjectOperationsImplementation

if it's not possible to prevent copying endlessly, we might need to prevent people from entering such target folders in the first place
Comment 2 Jaroslav Tulach 2012-06-19 15:56:00 UTC
Anybody else believes this is P2 bug? Seems like a trivial user error to me.
Comment 3 Jaroslav Tulach 2012-06-19 16:13:23 UTC
ergonomics#c146b4014e39
Comment 4 Quality Engineering 2012-06-22 04:48:44 UTC
Integrated into 'main-golden', will be available in build *201206220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c146b4014e39
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #214259: Check for subfolders being a target
Comment 5 Jaroslav Tulach 2012-11-22 08:31:10 UTC
*** Bug 217551 has been marked as a duplicate of this bug. ***