Bug 198114 - Allowed to move file into existing folder/archive on first attempt
Summary: Allowed to move file into existing folder/archive on first attempt
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kevin Doyle CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 198007
  Show dependency tree
 
Reported: 2007-07-27 11:34 EDT by Rupen Mardirossian CLA
Modified: 2011-05-25 07:47 EDT (History)
2 users (show)

See Also:


Attachments
Fixed the enablement of Okay button (1.35 KB, patch)
2007-07-27 14:15 EDT, Kevin Doyle CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rupen Mardirossian CLA 2007-07-27 11:34:05 EDT
To replicate 

1)create folder/archive
2)create a file within
3)right click file - > Move
4)Initial folder/archive selected is parent and the OK button is enabled.

If move is initiated on a folder nothing happens... if it is done on the archive the file is erased.



-----------Enter bugs above this line-----------
installation : eclipse-SDK-3.3RC4 
RSE install  : RSE-DEV
java.runtime : Sun 1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-07-27 11:44:42 EDT
Ouch! If moving an archive member out to the archive, and the archive is even selected as default, this can mean SERIOUS loss of data. This is a must fix for 2.0.1.

Assigning Kevin since this is exactly the scenario you mentioned in bug 198007 comment 2.
Comment 2 Xuan Chen CLA 2007-07-27 13:14:53 EDT
Right now, if you want to copy/move a folder into an Archive file in dstore, it did not work.  Please see bug 198046 for more information.

From what I've debugged so far, this function never worked (the problem is related to the handling for copyBatch() operation. copy() works fine for the scenario I listed there, but could have problem when copy/moving folder from one archive to another).  But I need more investigation.

Since Move will result losing data, I think it is probably not a good idea to enable moving to an Archive file before the issue mentioned in bug 198046 is fixed.
Comment 3 Kevin Doyle CLA 2007-07-27 14:15:21 EDT
Created attachment 74818 [details]
Fixed the enablement of Okay button

We were setting the selection before setting the validator and that was why the Okay button was enabled.  I've changed it around so now the Okay button is not enabled.

You can still try to move a folder into an Archive on dstore and it will not work.  Thats a different bug though.

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 4 David McKnight CLA 2007-07-27 16:46:37 EDT
I've committed this fix.
Comment 5 Xuan Chen CLA 2007-07-27 23:58:41 EDT
Actually, I was wrong about the "move" in comment #2.  The "move folder to archive" works in dstore, since it uses "copy" and "delete".  Only "copy folder to archive" does not work, since it used "copyBatch".
The only problem I saw for "move" is that if there is an empty folder with the same name in the archive already, the overwriting does not works correctly.
Comment 6 Martin Oberhuber CLA 2007-07-30 08:37:14 EDT
Dave pls dont forget setting the contributed kwd.
Comment 7 Rupen Mardirossian CLA 2007-08-08 11:22:43 EDT
Verified with dev driver.  Closing the bug.