After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769309 - dragging several files into / out from a folder with '&' in its name fails in some circumstances
dragging several files into / out from a folder with '&' in its name fails in...
Status: RESOLVED FIXED
Product: gnome-commander
Classification: Other
Component: application
1.4.x
Other Linux
: Normal minor
: 1.4
Assigned To: GNOME Commander maintainer(s)
GNOME Commander maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-07-29 17:13 UTC by Ernest
Modified: 2016-08-16 11:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debugger output transcript (25.51 KB, text/plain)
2016-08-10 06:33 UTC, Ernest
Details

Description Ernest 2016-07-29 17:13:26 UTC
Maybe it's bad practice, but if filesystem allows, it can happen: you have a folder with an ampersand in its name.

I can drag one file into / out from this folder without issues in every case I tested.

But if you try to drag several files at once, either copy or move them, this works only sometimes. I have found it to fail (i.e. do nothing):

i. when the destination folder is in the same level the files come from

ii. when trying to put the files out of the folder, i.e. drag & drop to '..'

Steps to reproduce:

1. create a folder named 'foo & bar'

2. in the same working directory, create some test files, say 'test1', 'test2', etc.

3. select all 'test*' files and try to drag & drop them into 'foo & bar' (will fail, either copy or move)

4. move them one by one into 'foo & bar'

5. cd to 'foo & bar'

6. select all 'test*' files and try to drag & drop them to '..' (will fail)
Comment 1 Uwe Scholz 2016-08-09 19:26:27 UTC
Thank you very much for taking the time to report this bug. Unfortunately I can not reproduce it with the current v1.4.8 on my system. I tried the given steps in /tmp as well as in my home directory. Nevertheless I believe that an '&' in the folder name can really lead to problems.

Therefore, do me a favor and start gcmd in a terminal with the following command: "gnome-commander -d a" so that debug messages are printed to the terminal. After that, repeat the steps you described. Now watch out for some error messages in the terminal. It could be that we get a hint about what's happening inside gcmd when moving the files fails.
Comment 2 Ernest 2016-08-10 06:33:59 UTC
Created attachment 333041 [details]
debugger output transcript
Comment 3 Ernest 2016-08-10 06:34:24 UTC
You are right: neither I can reproduce the issue with the steps listed!

After some struggling, I could reproduce the problem at apparently random occurrences (this means I will not try to set a step-by-step list again) but in every occurrence, a dir *rename* with new name including an '&' was involved. AFAICS it has something to do with the dirlist cache.

When the issue surfaces, I get this kind of messages from the debugger:

(gnome-commander:4060): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity - escape ampersand as &

I am attaching the debugger output from one session.

This, I hope, will give you some hint. Also notice that maybe the copy/move is performed, just the dir listing is not updated.
Comment 4 Uwe Scholz 2016-08-14 19:57:51 UTC
I could identify the causes which lead to the warning messages and fixed the related problems. Now, the directory indicator is updated also for directories with '&' in the name - the problem was missing string escaping. This is now done also for the "delete dialog" which had the same problem.

The fix will go into the next stable release of Gcmd.

Nevertheless, the problem with not working copy/move of files could still not be reproduced here. If you have more info on how the reproduce it permanently, don't hesitate to open a new bug report.
Comment 5 Ernest 2016-08-16 11:48:07 UTC
Great. As suggested, maybe the copy/move was performed, just the dir listing was not updated. Can't say for sure for the original occurrence, but I remember there was a lot of folder renaming/moving involved. When trying to reproduce the issue, that seemed to be the case.

Anyway will keep an eye on this. Thank you.