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

Bug 284163

Summary: Using the ~ (tilde) results in an invalid location
Product: [Eclipse Project] Platform Reporter: Denis Roy <denis.roy>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P5 CC: Kevin_McGuire
Version: 3.5Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 5717    
Bug Blocks:    
Attachments:
Description Flags
Screenshot none

Description Denis Roy CLA 2009-07-21 13:33:34 EDT
Created attachment 142157 [details]
Screenshot

Using Galileo GA

When creating a patch, it seems that ~/patch.txt is not a valid location for the file.  However, under *nix, ~/patch.txt is perfectly valid.

It would save me some typing and clicking if Eclipse could figure this one out.
Comment 1 Denis Roy CLA 2009-07-21 13:36:32 EDT
Related to bug 5717 ?
Comment 2 Szymon Brandys CLA 2009-07-27 08:44:46 EDT
(In reply to comment #0)
> When creating a patch, it seems that ~/patch.txt is not a valid location for the
> file.  However, under *nix, ~/patch.txt is perfectly valid.

Isn't it that ~ is not a valid location on *nix and a shell just resolves it into the home directory?
Anyway, if we agree that ~ should be respected in location fields, we have to address it everywhere in Eclipse.

We could handle relative paths in the create patch dialog in a similar way how it's done for the import dialog (see bug 5717). 
They simply use canonical forms of relative paths, which for ~/patch.txt would be user.dir/~/patch.txt.

Comment 3 Denis Roy CLA 2009-07-27 09:12:28 EDT
> Isn't it that ~ is not a valid location on *nix and a shell just resolves it
> into the home directory?


Perhaps, but most other GUI apps I use properly handle the ~ directory.  Eclipse always stands out as the one that doesn't.
Comment 4 Szymon Brandys CLA 2009-07-27 09:59:25 EDT
(In reply to comment #3)
> Perhaps, but most other GUI apps I use properly handle the ~ directory.  Eclipse
> always stands out as the one that doesn't.

Good point. 
Kevin, do you have any comments on that? If the create patch dialog is fixed, we should fix the rest of Platform and also PDE and JDT.
Comment 5 Paul Webster CLA 2009-07-31 08:17:00 EDT
(In reply to comment #4)
> 
> Good point. 
> Kevin, do you have any comments on that? If the create patch dialog is fixed,
> we should fix the rest of Platform and also PDE and JDT.
> 

And WTP and CDT and BIRT and ... etc

PW
Comment 6 Denis Roy CLA 2009-07-31 10:20:51 EDT
(In reply to comment #3)
> Perhaps, but most other GUI apps I use properly handle the ~ directory. 
> Eclipse always stands out as the one that doesn't.

As discussed in bug 5717, this is not true.  Other apps either invoke the native dialog from the onset, or force the user to click [Choose] or [Browse] which invokes the native dialog.

With that in mind, I suggest closing as WORKSFORME, since I prefer Eclipse's dialog instead of being forced to click [Browse].

Comment 7 Szymon Brandys CLA 2009-07-31 11:32:33 EDT
(In reply to comment #6)
> With that in mind, I suggest closing as WORKSFORME, since I prefer Eclipse's
> dialog instead of being forced to click [Browse].

So be it ;)