diff options
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/clean/app/config.rs | 2 | ||||
-rw-r--r-- | src/config/clean/app/display/sort_type.rs | 4 | ||||
-rw-r--r-- | src/config/raw/app/config.rs | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/config/clean/app/config.rs b/src/config/clean/app/config.rs index ee3a24b..11272a0 100644 --- a/src/config/clean/app/config.rs +++ b/src/config/clean/app/config.rs @@ -18,6 +18,7 @@ pub struct AppConfig { pub use_trash: bool, pub xdg_open: bool, pub xdg_open_fork: bool, + pub case_sensitive_ext: bool, pub watch_files: bool, pub custom_commands: Vec<CustomCommand>, pub focus_on_create: bool, @@ -84,6 +85,7 @@ impl From<AppConfigRaw> for AppConfig { use_trash: raw.use_trash, xdg_open: raw.xdg_open, xdg_open_fork: raw.xdg_open_fork, + case_sensitive_ext: raw.case_sensitive_ext, watch_files: raw.watch_files, cmd_aliases: raw.cmd_aliases, focus_on_create: raw.focus_on_create, diff --git a/src/config/clean/app/display/sort_type.rs b/src/config/clean/app/display/sort_type.rs index 3041951..6741e04 100644 --- a/src/config/clean/app/display/sort_type.rs +++ b/src/config/clean/app/display/sort_type.rs @@ -123,8 +123,8 @@ fn size_sort(file1: &JoshutoDirEntry, file2: &JoshutoDirEntry) -> cmp::Ordering } fn ext_sort(file1: &JoshutoDirEntry, file2: &JoshutoDirEntry) -> cmp::Ordering { - let f1_ext = file1.get_ext(); - let f2_ext = file2.get_ext(); + let f1_ext = file1.ext().unwrap_or_default(); + let f2_ext = file2.ext().unwrap_or_default(); alphanumeric_sort::compare_str(f1_ext, f2_ext) } diff --git a/src/config/raw/app/config.rs b/src/config/raw/app/config.rs index 4ded404..8c8b0ab 100644 --- a/src/config/raw/app/config.rs +++ b/src/config/raw/app/config.rs @@ -29,6 +29,8 @@ pub struct AppConfigRaw { #[serde(default)] pub xdg_open: bool, #[serde(default)] + pub case_sensitive_ext: bool, + #[serde(default)] pub xdg_open_fork: bool, #[serde(default = "default_true")] pub watch_files: bool, |