mirror of
https://github.com/MidnightCommander/mc-old.git
synced 2026-02-02 11:11:36 -08:00
file_op_context_t: remove op_preserve member.
(file_mask_dialog): use local variable instead. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user