mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
(copy_dir_dir): clarify get of mode and attributes of source directory.
Use the same way as in copy_file_file(). Signed-off-by: Andrew Borodin <borodin@axion.lan>
This commit is contained in:
parent
5486bdad0e
commit
1f36a3fd80
@ -2970,19 +2970,19 @@ copy_dir_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const char
|
|||||||
/* First get the mode of the source dir */
|
/* First get the mode of the source dir */
|
||||||
|
|
||||||
retry_src_stat:
|
retry_src_stat:
|
||||||
if ((*ctx->stat_func) (src_vpath, &src_stat) != 0)
|
while ((*ctx->stat_func) (src_vpath, &src_stat) != 0)
|
||||||
{
|
{
|
||||||
if (ctx->ignore_all)
|
if (ctx->ignore_all)
|
||||||
return_status = FILE_IGNORE_ALL;
|
return_status = FILE_IGNORE_ALL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return_status = file_error (TRUE, _("Cannot stat source directory \"%s\"\n%s"), s);
|
return_status = file_error (TRUE, _("Cannot stat source directory \"%s\"\n%s"), s);
|
||||||
if (return_status == FILE_RETRY)
|
|
||||||
goto retry_src_stat;
|
|
||||||
if (return_status == FILE_IGNORE_ALL)
|
if (return_status == FILE_IGNORE_ALL)
|
||||||
ctx->ignore_all = TRUE;
|
ctx->ignore_all = TRUE;
|
||||||
}
|
}
|
||||||
goto ret_fast;
|
|
||||||
|
if (return_status != FILE_RETRY)
|
||||||
|
goto ret_fast;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (attrs_ok && mc_fgetflags (src_vpath, &attrs) != 0)
|
while (attrs_ok && mc_fgetflags (src_vpath, &attrs) != 0)
|
||||||
@ -2991,27 +2991,25 @@ copy_dir_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const char
|
|||||||
|
|
||||||
/* don't show an error message if attributes aren't supported in this FS */
|
/* don't show an error message if attributes aren't supported in this FS */
|
||||||
if (attrs_ignore_error (errno))
|
if (attrs_ignore_error (errno))
|
||||||
{
|
|
||||||
return_status = FILE_CONT;
|
return_status = FILE_CONT;
|
||||||
break;
|
else if (ctx->ignore_all)
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx->ignore_all)
|
|
||||||
return_status = FILE_IGNORE_ALL;
|
return_status = FILE_IGNORE_ALL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return_status =
|
return_status =
|
||||||
file_error (TRUE, _("Cannot get ext2 attributes of source directory \"%s\"\n%s"),
|
file_error (TRUE, _("Cannot get ext2 attributes of source directory \"%s\"\n%s"),
|
||||||
s);
|
s);
|
||||||
if (return_status == FILE_RETRY)
|
|
||||||
{
|
|
||||||
attrs_ok = TRUE;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (return_status == FILE_IGNORE_ALL)
|
if (return_status == FILE_IGNORE_ALL)
|
||||||
ctx->ignore_all = TRUE;
|
ctx->ignore_all = TRUE;
|
||||||
|
if (return_status == FILE_ABORT)
|
||||||
|
goto ret_fast;
|
||||||
}
|
}
|
||||||
goto ret_fast;
|
|
||||||
|
if (return_status != FILE_RETRY)
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* yet another attempt */
|
||||||
|
attrs_ok = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_in_linklist (dest_dirs, src_vpath, &src_stat) != NULL)
|
if (is_in_linklist (dest_dirs, src_vpath, &src_stat) != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user