[ 
https://issues.apache.org/jira/browse/PIVOT-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923527#action_12923527
 ] 

Greg Brown commented on PIVOT-655:
----------------------------------

Interesting use case. Obviously, "c:\" is meaningless on a Mac, but when I 
enter a "/" in the "save as" field on OS X, I get a prompt asking me which 
folder I want to go to. Never knew that feature existed.

We can't follow this approach exactly since absolute path specifiers are not 
cross-platform (nor do I think it is necessarily the best UI), but we could 
probably do something to handle it. Maybe we could create a File from the 
contents of the text input and:

a) if relative, append to the parent directory
b) if absolute, set the parent directory to the file's parent and the selected 
file to the last path component of the file

Thoughts?



> FileBrowserSheet save dialog appends the saveas field content to the selected 
> folders/file
> ------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-655
>                 URL: https://issues.apache.org/jira/browse/PIVOT-655
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 1.5.1
>            Reporter: A.J.
>
> If you copy/paste or type an absolute path to the save as text input field, 
> the result 'selectedFile' is the concatenation of the selected path and the 
> path in the text input.
> So you may end up with a File object pointing to something like : 
> "C:\toto\D:\myotherdirectory\file" which is obviously incorrect.
> we can (should) check the result from the dialog but handling this case 
> should, imho, be done by the FileBrowserSheet component.
> What do you think ? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to