Description of problem:
If I use shell globbing in copy or move, mc use it badly. I make a backup copy same directory:
source mask: *
Midnight Commander use original name, without '1'.
Version-Release number of selected component (if applicable):
This is a regression.
mkdir -p tmp/a
I use mc Copy (F5):
Copy directory "a" with source mask:
┌──────────── Error ─────────────┐
│ "/home/common/temp/a/file.txt" │
│ and │
│ "./a/file.txt" │
│ are the same file │
│ [ Skip ] [ Abort ] │
Because target directory name 'a', not 'a1'.
Bad target directory name.
Good target directory name, copy is OK.
This problem is actually in mc-4.7.4-1.fc13.x86_64.
Select test. Push F5 - Copy. Source mask *, to *.old. Target file name ".old", not a "test.old". :(
Select test. Push F5 - Copy. Source mask *, to *1. You get error message, because target file name same, then source file name. :( Correct name "test1", but bad name "test". :(
Yes, this is a serious regression in mc globbing behavior. Please fix ASAP!
Also present in mc-4.7.3-2.fc13 which gives a hint that it is regression from the bug 624973 or bug 576622 fix.
Also affects "Move" (F6):
1. press F7, create test directory "1"
2. enter dir "1"
3. run "touch bar"
4. highlight file "bar"
5. press F6 to open "Move" dialog, move "*" to "fu*"
Result is: fu\
Should be: fubar
*** Bug 640053 has been marked as a duplicate of this bug. ***
Created attachment 451876 [details]
Also submitted upstream:
Thanks for the patch.
The patch is quite redundant so after all the crap removal, this is the relevant fix for the issue:
@@ -144,7 +144,6 @@ mc_search__translate_replace_glob_to_reg
g_string_append_c (buff, '\\');
c = ++cnt;
/* breaks copying: mc uses "\0" internally, it must not be changed */
Fixed in rawhide for now. Updates are in progress. Please give them positive karma to see them in stable Fedoras soon.
Thanks, work in rawhide.
mc-4.7.4-2.fc13 has been submitted as an update for Fedora 13.
mc-4.7.4-2.fc12 has been submitted as an update for Fedora 12.
mc-4.7.4-2.fc14 has been submitted as an update for Fedora 14.
mc-4.7.4-2.fc14.x86_64 work. Thank you!
mc-4.7.4-2.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update mc'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mc-4.7.4-2.fc14
*** Bug 642063 has been marked as a duplicate of this bug. ***
mc-4.7.4-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
mc-4.7.4-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
mc-4.7.4-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.