From 27cc9ac15e5596bae25f0836403d1bfe52de0e3b Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 26 Oct 2009 13:32:10 +0200 Subject: [PATCH] Ticket #119: Persistent global configuration option for "Preserve attributes" wanted Currently, there is no way to change the defaults. The file mask dialog options are not persistent. Added new config option 'copymove_persistent_attr'. If this option is equal to '0' then 'Preserve attributes' in copy/move dialog will always switched off. Signed-off-by: Slava Zanko --- src/filegui.c | 3 +++ src/setup.c | 2 ++ src/setup.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/filegui.c b/src/filegui.c index 61911c6c0..ac706b1e0 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -166,6 +166,9 @@ filegui__check_attrs_on_fs(const char *fs_path) { struct statfs stfs; + if (!setup_copymove_persistent_attr) + return 0; + if (statfs(fs_path, &stfs)!=0) return 1; diff --git a/src/setup.c b/src/setup.c index 6359fb621..99e263d42 100644 --- a/src/setup.c +++ b/src/setup.c @@ -89,6 +89,7 @@ int startup_right_mode; /* Ugly hack to allow panel_save_setup to work as a place holder for */ /* default panel values */ int saving_setup; +int setup_copymove_persistent_attr = 1; static const struct { const char *key; @@ -225,6 +226,7 @@ static const struct { { "mcview_remember_file_position", &mcview_remember_file_position }, { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, { "reverse_files_only", &reverse_files_only }, + { "copymove_persistent_attr", &setup_copymove_persistent_attr }, { 0, 0 } }; diff --git a/src/setup.h b/src/setup.h index 30301cb13..74da03320 100644 --- a/src/setup.h +++ b/src/setup.h @@ -35,4 +35,6 @@ extern int verbose; extern int mouse_close_dialog; extern int reverse_files_only; +extern int setup_copymove_persistent_attr; + #endif