Ticket #175 (closed defect: wontfix)
Problems working 'naturally' with remote files
| Reported by: | stin | Owned by: | alamaison |
|---|---|---|---|
| Priority: | critical (affects core workflow) | Milestone: | 0.6.x Bug sprint |
| Component: | remote folder | Version: | 0.6.0 |
| Keywords: | working, edit, notepad, text, saving, modifying, files | Cc: |
Description
This may be linked to other read-only/access denied-type problems.
I am using Windows XP SP3, 2x HT Xeon, 3GB RAM.
- Installed Swish;
- Added a connection to my SFTP server;
- Opened connection after entering password;
- Navigated to a text file and double-clicked to edit it;
- The file opened up in my editor (Notepad++) and allowed me to edit it;
- I tried to save it but got an error from Notepad++: 'Please check if this file is open in another program' and then marked it as read-only;
- I then tried to open it in Notepad and got, simply, 'Access denied'.
Everything seemed to work fine up to this point, so thumbs up from me :)
Also like to bounce the extra options for logging-out, proper SFTP URIs, etc... Anyone mentioned mapping to drive letters?
Attachments
Change History
Changed 14 months ago by stin
-
attachment
cant-save-notepad++.JPG
added
comment:1 in reply to: ↑ description Changed 13 months ago by alamaison
Replying to stin:
...
- Navigated to a text file and double-clicked to edit it;
- The file opened up in my editor (Notepad++) and allowed me to edit it;
- I tried to save it but got an error from Notepad++: 'Please check if this file is open in another program' and then marked it as read-only;
Are you able to Save As instead of Save?
- I then tried to open it in Notepad and got, simply, 'Access denied'.
Open it? Which file are you opening this second time? The same file by opening it from the Swish Window? Or the local temporary file?
Also like to bounce the extra options for logging-out, proper SFTP URIs, etc... Anyone mentioned mapping to drive letters?
If you look through the existing bug reports, all these issues are already there. And yes, mapping drive letters has been mentioned 3 or 4 dozen times :P It won't happen in Swish because that needs a filesystem driver which Swish is not.
So basically, when you double-click on a file in Swish, it copies the file to your temporary directory and then opens that. Swish is not a file system driver so it can't write directly to the remote file. This way of working is standard and should be identicaly to the in-built Windows FTP client. It would be useful for us if you could test that this is the case. Swish marks the temporary file as Read-Only as that usually causes apps to only offer the Save As option so this might be a problem specific to Notepad++.
comment:2 follow-up: ↓ 3 Changed 13 months ago by stin
- I tried to save it but got an error from Notepad++: 'Please check if this file is open in another program' and then marked it as read-only;
Q: Are you able to Save As instead of Save?
A: Yes, but this isn't natural, is it? Why would this be an accepted feature? :/
- I then tried to open it in Notepad and got, simply, 'Access denied'.
Q: Open it? Which file are you opening this second time? The same file by opening it from the Swish Window? Or the local temporary file?
A: 'It' refers to the file I am opening in swish: The same file, yes... If I change what I am doing, it's not a fair test, is it?
"If you look through the existing bug reports, all these issues are already there."
I did, which is why I'd like to draw your attention to them and show you that I agree with the ideas. (I should've put 'bump' lol)
"And yes, mapping drive letters has been mentioned 3 or 4 dozen times :P It won't happen in Swish because that needs a filesystem driver which Swish is not."
So, it's a file transfer program, or like WinSCP's 'Keep remote directory up to date' function? (I usually use WinSCP and Notepad++ WITHOUT any problems...)
Could you do a local drive map and synch the folder copy? :/
"So basically, when you double-click on a file in Swish, it copies the file to your temporary directory and then opens that."
Yes. That's how I'd do it.
"Swish is not a file system driver so it can't write directly to the remote file."
It'd be a handy feature... K, so we're using a local copy. That's fine.
"This way of working is standard and should be identicaly to the in-built Windows FTP client. It would be useful for us if you could test that this is the case."
How do I 'test' that it's like the MS Windows FTP client??
"Swish marks the temporary file as Read-Only as that usually causes apps to only offer the Save As option so this might be a problem specific to Notepad++."
AH!!! And there is your problem: Why mark the local copy of the file as 'read-only' if I am meant to modify it's contents, which (I presume) Swift sees and uploads the modified file back to the server, yes?
Specific to Notepad++??? But MS Notepad behaves the same :S
Also, Notepad++ is not behaving badly - The file IS read-only. You CAN'T modify it... You think a program should try to modify a read-only file? :S
Just stop marking it as read-only. That seems to be the ONLY problem I have encoutnered so far... Don't mark as read-only and don't lock the file (by keeping the stream open, etc) :)
comment:3 in reply to: ↑ 2 Changed 13 months ago by alamaison
Replying to stin:
- I tried to save it but got an error from Notepad++: 'Please check if this file is open in another program' and then marked it as read-only;
Q: Are you able to Save As instead of Save?
A: Yes, but this isn't natural, is it? Why would this be an accepted feature? :/
It's standard behaviour for a namespace extension that represents virtual files.
- I then tried to open it in Notepad and got, simply, 'Access denied'.
That sounds like a bug.
Could you do a local drive map and synch the folder copy? :/
It's a nice idea. A lot of work because then you have to deal with all sorts of n-way-sync issues but if someone provides the patches, we're happy to include them in Swish.
"This way of working is standard and should be identicaly to the in-built Windows FTP client. It would be useful for us if you could test that this is the case."
How do I 'test' that it's like the MS Windows FTP client??
Use Windows Explorer to open a file on an FTP share using Notepad++. Do you experience the same behaviour?
"Swish marks the temporary file as Read-Only as that usually causes apps to only offer the Save As option so this might be a problem specific to Notepad++."
AH!!! And there is your problem: Why mark the local copy of the file as 'read-only' if I am meant to modify it's contents, which (I presume) Swift sees and uploads the modified file back to the server, yes?
Swish does not upload the modified file unless you copy it back. This is why we set it read-only: to force Save As to a non-temporary location. This is how the in-built FTP client works which we modelled Swish on.
At some point in the future (sooner if someone contributes a patch) we hope to change it to auto-upload the modified file.
Specific to Notepad++??? But MS Notepad behaves the same :S
Notepad doesn't let you save the file? It should bring up the Save As dialog when you select Save (or press Ctrl+S). Try this before using Notepad++ to open a file as there may be an interaction bug there.
Also, Notepad++ is not behaving badly - The file IS read-only. You CAN'T modify it... You think a program should try to modify a read-only file? :S
Just stop marking it as read-only. That seems to be the ONLY problem I have encoutnered so far... Don't mark as read-only and don't lock the file (by keeping the stream open, etc) :)
Swish doesn't lock the file. It marks it read only to stop you saving your changes in a temporary file without realising.
comment:4 follow-up: ↓ 6 Changed 13 months ago by stin
Ah... Crossed wires. I was expecting the file to be writeable and the modifications to trigger an upload the file back to where Swish got it from :S
This is kinda the functionality I'm looking for. :/ I have WinSCP to up/download files, which does the write-back on modify... I was hoping this would reduce the need for an extra interface.
I have no idea if my skills are comparable, but I'll help you if I can - just a couple of things to add to make me happy :D
I'll have a quick look at the source :)
comment:5 follow-up: ↓ 7 Changed 13 months ago by stin
Errrrrmmmmmm... I have no idea what I'm looking to download :S What do I need to start working on the code? I'm old-school... No IDE's in my day lol
Also, it looks like a Microsoft Visual C project :/
comment:6 in reply to: ↑ 4 Changed 13 months ago by alamaison
Replying to stin:
I'll have a quick look at the source :)
If you want to clone the repository, it is hosted on GitHub: https://github.com/alamaison/swish
comment:7 in reply to: ↑ 5 Changed 13 months ago by alamaison
Replying to stin:
Errrrrmmmmmm... I have no idea what I'm looking to download :S What do I need to start working on the code? I'm old-school... No IDE's in my day lol
Surely they had Emacs ;)
This commit diff should give you an idea of what's involved: http://github.com/alamaison/swish/commit/43d61957036d48dd3b204d7bc049e900cadd0a89. It's the one that introduced double-clicking to open files.
Also, it looks like a Microsoft Visual C project :/
Alas, yes. Eventually we hope to compile Swish with GCC but we depend on WTL for some of our GUIs and that only works with MSVC.

The actual error from Notepad++