mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
(copy_file_file): handling "Abort" button on chown/chmod/chattr error.
The "Abort" buton must interrupt the copy/move of a directory mot a file only. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
901a1a98a9
commit
51ff7dc13c
@ -2833,6 +2833,11 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
|
|||||||
&& !ctx->skip_all)
|
&& !ctx->skip_all)
|
||||||
{
|
{
|
||||||
temp_status = file_error (TRUE, _("Cannot chown target file \"%s\"\n%s"), dst_path);
|
temp_status = file_error (TRUE, _("Cannot chown target file \"%s\"\n%s"), dst_path);
|
||||||
|
if (temp_status == FILE_ABORT)
|
||||||
|
{
|
||||||
|
return_status = FILE_ABORT;
|
||||||
|
goto ret_fast;
|
||||||
|
}
|
||||||
if (temp_status == FILE_RETRY)
|
if (temp_status == FILE_RETRY)
|
||||||
continue;
|
continue;
|
||||||
if (temp_status == FILE_SKIPALL)
|
if (temp_status == FILE_SKIPALL)
|
||||||
@ -2849,6 +2854,11 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
|
|||||||
&& !ctx->skip_all)
|
&& !ctx->skip_all)
|
||||||
{
|
{
|
||||||
temp_status = file_error (TRUE, _("Cannot chmod target file \"%s\"\n%s"), dst_path);
|
temp_status = file_error (TRUE, _("Cannot chmod target file \"%s\"\n%s"), dst_path);
|
||||||
|
if (temp_status == FILE_ABORT)
|
||||||
|
{
|
||||||
|
return_status = FILE_ABORT;
|
||||||
|
goto ret_fast;
|
||||||
|
}
|
||||||
if (temp_status == FILE_RETRY)
|
if (temp_status == FILE_RETRY)
|
||||||
continue;
|
continue;
|
||||||
if (temp_status == FILE_SKIPALL)
|
if (temp_status == FILE_SKIPALL)
|
||||||
@ -2888,6 +2898,8 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
|
|||||||
|
|
||||||
temp_status = file_error (TRUE, _("Cannot set attributes for target file \"%s\"\n%s"),
|
temp_status = file_error (TRUE, _("Cannot set attributes for target file \"%s\"\n%s"),
|
||||||
dst_path);
|
dst_path);
|
||||||
|
if (temp_status == FILE_ABORT)
|
||||||
|
return_status = FILE_ABORT;
|
||||||
if (temp_status == FILE_RETRY)
|
if (temp_status == FILE_RETRY)
|
||||||
{
|
{
|
||||||
attrs_ok = TRUE;
|
attrs_ok = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user