[PATCH] "'a' and 'b' are the same file/directory" message box needs "Abort" button.



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

Attachment: mc_samefile_abort.diff
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]