Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 168220

Summary: [local] Copying a file with special characters fails without notice
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Martin Oberhuber <mober.at+eclipse>
Status: RESOLVED DUPLICATE QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: rgerganov
Version: 1.0Keywords: bugday
Target Milestone: 3.0 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Oberhuber CLA 2006-12-15 10:50:15 EST
- On Windows-Local, create a folder "test"
- In the folder, create new file named
  "I am wild $(char) ${HOME} @ &;^special's file`quote.txt"
- Dbl click the file and edit it
- Drag & drop the file into it's own directory ("test")
  --> Rename/Overwrite dialog is shown
- Choose Rename and enter a filename e.g. "normal.txt"
- Dbl click on normal.txt

--> The file is empty, so the copy operation failed

Looking at the code in LocalFileService.txt, the failure is expected.
Instead of quoting filenames, native commands should be called through
Runtime.getRuntime().exec(String[] args)

Also, a Unit Test should be created for securing fixes for the future



-----------Enter bugs above this line-----------
RSE 1.0.1 Release Test
installation : eclipse-SDK-3.2.1
RSE install  : Download RSE-SDK-N20061215-0100
java.runtime : Sun 1.5.0_09-b03
os.name:     : Windows XP 5.1, Service Pack 1
------------------------------------------------
systemtype   : Windows-local, Dstore-win, Dstore-linux
targetos     : Red Hat Enterprise Linux WS release 4 (Nahant Update 3)
targetuname  : Linux parser 2.6.9-34.EL #1 i686 athlon i386 GNU/Linux
targetvm     : Sun Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2006-12-15 10:52:03 EST
According to "cmd /?", more special chars on windows are
   &()[]{}^=;!'+,`~
These should all be tested.
Comment 2 Radoslav Gerganov CLA 2008-02-24 09:52:30 EST
This one is duplicate of #188330, it is fixed now. Not sure if it has unit test though.
Comment 3 Martin Oberhuber CLA 2008-09-16 16:35:51 EDT
Verified that this is fixed, marking as dup of bug 188330 as per Rado's comment.

Actually, the original steps to reproduce don't work any more because the "Rename/Overwrite" dialog has been removed as per bug 210682 and pasting onto itself has been modified as per bug 227213.

See also bug 181667.

*** This bug has been marked as a duplicate of bug 188330 ***