Bug 177111
Summary: | Bug when copying/move file to deleted directory | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marcin Garski <mgarski> | ||||
Component: | mc | Assignee: | Jindrich Novy <jnovy> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4 | CC: | leonard-rh-bugzilla, pknirsch | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
URL: | http://mail.gnome.org/archives/mc-devel/2005-November/msg00006.html | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-03-16 12:05:24 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Marcin Garski
2006-01-06 13:13:27 UTC
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. |