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

Bug 351517

Summary: AbstractFileChooserField: Unescape Quotes
Product: z_Archived Reporter: Adrian Moser <trekking09>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: Andreas.Hoegger, zimmermann
Version: unspecifiedFlags: zimmermann: indigo+
zimmermann: juno+
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:
Attachments:
Description Flags
Patch File zimmermann: iplog+

Description Adrian Moser CLA 2011-07-08 03:57:23 EDT
PROBLEM DESCRIPTION:
- Assume Dialog with FileChooserField
- Copy a quoted file path into the Field (e.g. "C:\Program Files")
- File name validates and changes to C:\Users\amo\Desktop\bsicrm\Program Files"
  (incl. quote)

EVALUATION:
- the file name should be unquoted correctly by Eclipse Scout

PROPOSED SOLUTION:
- paste path into field (e.g. "C:\Program Files")
- path validates to C:\Program Files (without quotes)

PATCH:
Index: src/org/eclipse/scout/rt/client/ui/form/fields/filechooserfield/AbstractFileChooserField.java
===================================================================
--- src/org/eclipse/scout/rt/client/ui/form/fields/filechooserfield/AbstractFileChooserField.java	(revision 1102)
+++ src/org/eclipse/scout/rt/client/ui/form/fields/filechooserfield/AbstractFileChooserField.java	(working copy)
@@ -351,6 +351,7 @@
     if (text != null && text.trim().length() == 0) text = null;
     if (text != null) {
       text = text.trim();
+      text = StringUtility.unquoteText(text);
       File f = new File(text);
       String p = "";
       if (f.isAbsolute()) {

(#103820)
Comment 1 Adrian Moser CLA 2011-07-08 04:15:43 EDT
Created attachment 199313 [details]
Patch File

Proposed Patch for trunk and branch 2011-Jun
Comment 2 Andreas Hoegger CLA 2011-07-13 08:16:00 EDT
Applied path to trunk and indigo RC1.
Thank you Adrian
Comment 3 Matthias Zimmermann CLA 2011-10-10 12:52:47 EDT
shipped with scout 3.7.1
Comment 4 Matthias Zimmermann CLA 2011-10-11 11:44:07 EDT
removed iplog flag from ticket and added iplog flag to attachment