Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351517 - AbstractFileChooserField: Unescape Quotes
Summary: AbstractFileChooserField: Unescape Quotes
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-08 03:57 EDT by Adrian Moser CLA
Modified: 2021-08-19 11:21 EDT (History)
2 users (show)

See Also:
zimmermann: indigo+
zimmermann: juno+


Attachments
Patch File (675 bytes, patch)
2011-07-08 04:15 EDT, Adrian Moser CLA
zimmermann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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