Hello Jindrich, I send this bug report on mc-devel but as I see, no one has reply, so I have decided to put it in RH bugzilla. Feel free to close it and wait for upstream resolution :) 1. cd /tmp && mkdir dir && mkdir dir/subdir && touch dir/file.txt 2. cd dir && mc 3. press Alt+i and in right panel cd into subdir 4. on left you should be in /tmp/dir on right in /tmp/dir/subdir 5. open second MC in new console, delete /tmp/dir/subdir 6. go back to first MC, in left panel selcet file.txt and copy or move it to directory in right panel (/tmp/dir/subdir) that don't exist 7. see what will happen (filename of file.txt will be changed to subdir) MC should report that /tmp/dir/subdir don't exist and it's immposible to copy/move file to it.
Hello Marcin, I successfully reproduced it after I saw your post on mc's upstream. I'll look more into it after the weekend. The more bugzillas you file, the more likely someone will look at it ;) Thanks for the heads-up, I almost forgot about it.
Created attachment 123109 [details] Patch to fix your problem. This is caused by the fact, that mc won't refresh contents of panels when a delete/move/copy command is requested. This causes in your particular case that the source file is /tmp/dir/file.txt and the default destination is /tmp/dir/subdir. Since /tmp/dir/subdir directory no more exists, mc thinks you want to move/copy the file.txt to a file named subdir. Note that a more suitable fix would be to present /tmp/dir/subdir/ as a destination in case it's directory, otherwise it's indisqushable for mc from a file.
This patch fix my problem. As you note it's not a perfect solution (but it's better then currently mc state), because user may not notice that after pressing F5 or F6 directory has changed. Maybe mc before delete/move/copy command should check if the directory exist if not then display warning message? I didn't have installed slang-devel and during configure: checking slang.h usability... no checking slang.h presence... no checking for slang.h... no checking slang/slang.h usability... no checking slang/slang.h presence... no checking for slang/slang.h... no configure: error: S-Lang library not found so it would be good to add slang-devel to BuildRequires.
It does. MC checks whether the directory to which is something copied exists, but in this case MC has no clue to figure out whether /tmp/dir/subdir was a directory or a file. This is the reason I vote for /tmp/dir/subdir/ to be sure it'll be considered a directory even if it doesn't exist. The both panels contain a directory without the slash and the information for target in copy/move dialog is taken from the panels. So stuff need to be fixed there instead. I'll have a look at it when I have some time. Regarding the slang problem, the FC3/FC4 versions don't contain slang-devel dependency since they're compiled with internal mcslang support. devel MC is linked against external slang, and there's slang-devel dependency so I don't understand how did you happen to see this. What mc version do you compile?
Thanks for answer about directories. I've downloaded this source rpm: http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/mc-4.6.1a-4.FC4.src.rpm and only added patch, bump release number and done rpmbuilb -ba mc.spec
Yes, I reproduced it. I changed in CVS a while ago, but fotgot that I haven't released any updates. Now I'm waiting to gather more fixes to ship them with upcoming updates all at once.