diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c index c930d30b8..caa481e46 100644 --- a/src/filemanager/filegui.c +++ b/src/filemanager/filegui.c @@ -1299,6 +1299,7 @@ char * file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format, const void *text, const char *def_text, gboolean * do_bg) { + gboolean preserve; size_t fmd_xlen; vfs_path_t *vpath; gboolean source_easy_patterns = easy_patterns; @@ -1311,7 +1312,8 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format return NULL; /* unselect checkbox if target filesystem doesn't support attributes */ - ctx->op_preserve = copymove_persistent_attr && filegui__check_attrs_on_fs (def_text); + preserve = copymove_persistent_attr && filegui__check_attrs_on_fs (def_text); + ctx->stable_symlinks = FALSE; *do_bg = FALSE; @@ -1376,7 +1378,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format QUICK_SEPARATOR (TRUE), QUICK_START_COLUMNS, QUICK_CHECKBOX (N_("Follow &links"), &ctx->follow_links, NULL), - QUICK_CHECKBOX (N_("Preserve &attributes"), &ctx->op_preserve, NULL), + QUICK_CHECKBOX (N_("Preserve &attributes"), &preserve, NULL), QUICK_NEXT_COLUMN, QUICK_CHECKBOX (N_("Di&ve into subdir if exists"), &ctx->dive_into_subdirs, NULL), QUICK_CHECKBOX (N_("&Stable symlinks"), &ctx->stable_symlinks, NULL), @@ -1410,7 +1412,7 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format ctx->stat_func = ctx->follow_links ? mc_stat : mc_lstat; - if (ctx->op_preserve) + if (preserve) { ctx->preserve = TRUE; ctx->umask_kill = 0777777; diff --git a/src/filemanager/fileopctx.c b/src/filemanager/fileopctx.c index 2da307269..72a51bafe 100644 --- a/src/filemanager/fileopctx.c +++ b/src/filemanager/fileopctx.c @@ -74,7 +74,6 @@ file_op_context_new (FileOperation op) ctx->operation = op; ctx->eta_secs = 0.0; ctx->progress_bytes = 0; - ctx->op_preserve = TRUE; ctx->do_reget = 1; ctx->stat_func = mc_lstat; ctx->preserve = TRUE; diff --git a/src/filemanager/fileopctx.h b/src/filemanager/fileopctx.h index ed0b5d625..1c26140dd 100644 --- a/src/filemanager/fileopctx.h +++ b/src/filemanager/fileopctx.h @@ -92,13 +92,6 @@ typedef struct size_t progress_count; uintmax_t progress_bytes; - /* The value of the "preserve Attributes" checkbox in the copy file dialog. - * We can't use the value of "ctx->preserve" because it can change in order - * to preserve file attributes when moving files across filesystem boundaries - * (we want to keep the value of the checkbox between copy operations). - */ - gboolean op_preserve; - /* Result from the recursive query */ FileCopyMode recursive_result;