[PATCH] "'a' and 'b' are the same file/directory" message box needs "Abort" button.
Denis Vlasenko
vda.linux at googlemail.com
Fri May 18 14:10:12 UTC 2007
Hi mc-devel,
Please try the following:
Find an unpacked kernel source tree or similarly voluminous directory.
Open the same directory in other panel.
Press F5 so that you are trying to copy it onto itself. You will see:
`/usr/src/kernel/linux-2.6.21.1/.gitignore' and
`/usr/src/kernel/linux-2.6.21.1/.gitignore' are the same file
It's a message box without buttons. You press ESC. It goes away and
new one appears:
`/usr/src/kernel/linux-2.6.21.1/.mailmap' and
`/usr/src/kernel/linux-2.6.21.1/.mailmap' are the same file
There are 30630 more files waiting for you. Not nice.
Attached patch fixes this by providing [Skip] and [Abort] buttons.
I'm not sure whether ESC should be equivalent to Abort as it is now,
feel free to change that.
Original code tried to prevent wrapping of very long filenames,
without much success:
- int msize = COLS - 36;
- char st[MC_MAXPATHLEN];
- strcpy (st, path_trunc (s, msize));
It doesn't work because we have _two_ filenames, and (COLS-36)*2 will
still overflow the screen. I removed this code for now.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc_samefile_abort.diff
Type: application/octet-stream
Size: 2928 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20070518/d1002b02/attachment.obj>
More information about the mc-devel
mailing list