Bug 352490 - File -> Open error when already have sftp:// file open
Summary: File -> Open error when already have sftp:// file open
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-09 18:05 UTC by EMR_Kde
Modified: 2016-03-29 15:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EMR_Kde 2015-09-09 18:05:40 UTC
Looks like they fixed the "Bug 345253 - Folder I'm currently in not restored when selecting "Open file" with remote protocol", but introduced another error:

So now when I have a file open via sftp, if I go to File -> Open, it attempts to open the actual full path/filename instead of the dirname. Reproduce: 
1) open a file via sftp (sftp://foo.example.com/home/smithj/myfile.txt) 
2) edit the file and save it 
3) goto file -> open 
4) error dialog comes up: The file or folder sftp://foo.example.com/home/smithj/myfile.txt does not exist. 

It's trying to go to that directory, but it's actually the file you have open instead. (when you click OK in the dialog box, in the directory line edit there's the full path/filename instead of just the path. In the above example it should be sftp://foo.example.com/home/smithj.) 


Reproducible: Always

Steps to Reproduce:
1) open a file via sftp (sftp://foo.example.com/home/smithj/myfile.txt) 
2) edit the file and save it 
3) goto file -> open 

Actual Results:  
error dialog comes up: The file or folder sftp://foo.example.com/home/smithj/myfile.txt does not exist. 

Expected Results:  
A directory listing of sftp://foo.example.com/home/smithj/ should come up.
Comment 1 Maxime Corteel 2015-10-25 18:35:08 UTC
I get the same error with FTP but my error message is different: "/somefolder/somefile is a file, expected a folder" (or something like that, it's translated).
Comment 2 Andreas Hartmetz 2016-03-29 15:38:40 UTC
The "trying to open file as folder" bug has been fixed in Kate and KWrite master today. It was simply passing the full file URL to the open file dialog. For some reason, that worked with local files.