Ticket #71: mc hangs up after "Skip all" choose

...in case of copy/move files w/o read permissions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2011-07-08 20:20:11 +04:00
parent 7963f44daa
commit ba4295e4f0
1 changed files with 6 additions and 2 deletions

View File

@ -1436,8 +1436,10 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
} }
} }
while (mc_fstat (src_desc, &sb) != 0 && !ctx->skip_all) while (mc_fstat (src_desc, &sb) != 0)
{ {
if (ctx->skip_all)
goto ret;
return_status = file_error (_("Cannot fstat source file \"%s\"\n%s"), src_path); return_status = file_error (_("Cannot fstat source file \"%s\"\n%s"), src_path);
if (return_status == FILE_RETRY) if (return_status == FILE_RETRY)
continue; continue;
@ -1485,8 +1487,10 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
ctx->do_append = FALSE; ctx->do_append = FALSE;
/* Find out the optimal buffer size. */ /* Find out the optimal buffer size. */
while (mc_fstat (dest_desc, &sb) != 0 && !ctx->skip_all) while (mc_fstat (dest_desc, &sb) != 0)
{ {
if (ctx->skip_all)
goto ret;
return_status = file_error (_("Cannot fstat target file \"%s\"\n%s"), dst_path); return_status = file_error (_("Cannot fstat target file \"%s\"\n%s"), dst_path);
if (return_status == FILE_RETRY) if (return_status == FILE_RETRY)
continue; continue;