mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
(filegui__check_attrs_on_fs): check copymove_persistent_attr before call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
669a8e3e17
commit
357711da33
@ -284,14 +284,12 @@ statvfs_works (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
filegui__check_attrs_on_fs (const char *fs_path)
|
filegui__check_attrs_on_fs (const char *fs_path)
|
||||||
{
|
{
|
||||||
STRUCT_STATVFS stfs;
|
STRUCT_STATVFS stfs;
|
||||||
|
|
||||||
if (!copymove_persistent_attr)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
#if USE_STATVFS && defined(STAT_STATVFS)
|
#if USE_STATVFS && defined(STAT_STATVFS)
|
||||||
if (statvfs_works () && statvfs (fs_path, &stfs) != 0)
|
if (statvfs_works () && statvfs (fs_path, &stfs) != 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1181,7 +1179,7 @@ file_mask_dialog (file_op_context_t * ctx, FileOperation operation,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* unselect checkbox if target filesystem doesn't support attributes */
|
/* unselect checkbox if target filesystem doesn't support attributes */
|
||||||
ctx->op_preserve = filegui__check_attrs_on_fs (def_text);
|
ctx->op_preserve = copymove_persistent_attr && filegui__check_attrs_on_fs (def_text);
|
||||||
ctx->stable_symlinks = FALSE;
|
ctx->stable_symlinks = FALSE;
|
||||||
*do_bg = FALSE;
|
*do_bg = FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user