i just tried to sync 2 folders /blabla/ over ssh connection, and there was a file called #test# in the online folder which was an old backup.
i selected to delete that file during syncing and then this happened:
it took ages to syng just 7 small files, and suddenly krusader said: cannot delete the file ssh://..../blabla/otherfile.php
after this the otherfile.php and all files in that folder were deleted!!!!
it seems, like the ssh sync sends the command:
and the filename becomes a comment and this results in
Steps to Reproduce:
i attached an example
Created attachment 58597 [details]
this shows how to reproduce the bug
This has nothing to do with kioslave since I cannot reproduce whatever the user is attempting to describe here using either Dolphin or Konqueror. This must be caused by functionality specific to krusader or something else...
confirmed in 2.4.0-beta3
The cause is the usage of not properly escaped paths in URLs.
If a path contains '#', everything that follows '#' it is interpreted as the fragment part of the URL and not part of the file path.
I'm working in a fix.
FYI: I'm NOT working on a fix any longer.
The syncronizer is considered unmaintained and the build has been disabled by default.
Why the hell is the synchronizer unmaintained???
The synchronizer is one of the killer feature over other file browsers and brings it nearer to a usable substitute of Total Commander on Windows.
Or is there an alternative to the synchronizer planned in Krusader?
On Sun, 29 Sep 2013 16:41:39 +0000
rubo77 <firstname.lastname@example.org> wrote:
> --- Comment #6 from rubo77 <email@example.com> ---
> Why the hell is the synchronizer unmaintained???
> The synchronizer is one of the killer feature over other file
> browsers and brings it nearer to a usable substitute of Total
> Commander on Windows.
> Or is there an alternative to the synchronizer planned in Krusader?
Guess why ...
Nobody is there to maintain it :-(
For further explanation have a look at the krusader-devel mailing list.
Git commit 7480bc3b95e41c876761bc11ef23d90a02fb2f56 by Toni Asensi Esteve.
Committed on 12/07/2015 at 11:48.
Pushed by asensi into branch 'master'.
In the synchronizer: until the bug 270150 is solved, stop using protocols like FISH, SFTP, SMB, etc. Check if the target or the source directory are empty
Before this change was applied, the bug caused problems if fish://, sftp://, or smb:// were directly used; however, using sshfs mounts (with e.g. sudo sshfs [...]), every synchronization seemed to work correctly, even using files that had one # (or several ones) in their names.
M +30 -0 krusader/Synchronizer/synchronizergui.cpp
Just to clarify:
This bug is not solved, the latest source code modifications have the aim of not allowing synchronizer to directly use protocols like FISH, SFTP, SMB, etc.; and so protecting the user. If this bug was solved, synchronizer would be able to directly use those protocols.
Created attachment 97242 [details]
The main idea behind this patch is checking whether QUrl isLocalFile. And if it is not a local file -> escape the uri's "#" character. This logic is done in a separate method so it can be changed from one place and this way applied to all uses throughout Synchronizer code.
I'm no Qt guru but I'm willing to maintain Synchronizer part of Krusader since it is currently unmaintained.
Created attachment 97314 [details]
A case seen with the patch sent by Martin Kostolny
Hi, Martin, thank you for your interest, a maintainer for the synchronizer part of Krusader is needed :-)
I've tried your patch; although the operations that need to be done are correctly calculated, when applying those operations there are files that are never deleted, I attach a screenshot. I can tell you about the tests that were done, or whatever is necessary. Thank you again for your interest!
Created attachment 97315 [details]
If it may help, I attach a screenshot: "After trying to synchronize, in Krusader two folders that could not be synchronized were seen that way; let's notice the %23 at the left panel.png"
> let's notice the %23 at the left panel
I mean that, as it could be seen in the first screenshot, in the real name of that directory there are no %23 but #
*** Bug 329896 has been marked as a duplicate of this bug. ***
Thank you very much for your extensive testing and help. I've tested my use cases only with sftp. I should have done it with more. So now I created the same test case as you ("1" and "2" directories with nested "#test#" contents...).
Surprisingly I didn't run into any problems with sftp and ftp protocols. Even fish protocol was fine until I used special czech characters such as "č", "ě" etc. It seems to be a problem with filename encoding and fish protocol. I'll file a separate bug report for that since dolphin is also affected by this issue.
You also mentioned %23 text in address bar and tabs. I believe this issue was already present before applying my patch. Aside from visual effect it should not have any bad influence in synchronizing directories.
Can you confirm any of my findings
- is sftp working fine?
- was there a special (excluding #) character in your tested fish path?
...or can you please direct me to more specific test case?
PS: I'm posting a little more polished patch - it should do exactly the same as the previous one but just to be sure we are testing with the same code. Or should we continue this in review board?
Created attachment 97319 [details]
I'm not saying that showing %23 in address path shouldn't be fixed. I just think it should be fixed as a separate commit & bug.
After some conversations (and a review request in https://git.reviewboard.kde.org/r/127287/), this bug was set as fixed thanks to Martin Kostolný.