From 33b651ad91ee7a4015250411f4d522e166145e8a Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Wed, 4 Jun 2025 00:20:59 +0200 Subject: [PATCH] Get remoteness of correct directory The history file is stored in the data dir, not the config dir, so the remoteness of the former is the one which matters. --- src/history/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/history/file.rs b/src/history/file.rs index 1659dcbd2..e7cd671dd 100644 --- a/src/history/file.rs +++ b/src/history/file.rs @@ -15,7 +15,7 @@ use crate::{ common::{str2wcstring, subslice_position, wcs2string}, flog::FLOG, - path::{path_get_config_remoteness, DirRemoteness}, + path::{path_get_data_remoteness, DirRemoteness}, }; /// History file types. @@ -243,7 +243,7 @@ fn should_mmap() -> bool { } // mmap only if we are known not-remote. - path_get_config_remoteness() != DirRemoteness::remote + path_get_data_remoteness() != DirRemoteness::remote } fn replace_all(s: &mut Vec, needle: &[u8], replacement: &[u8]) {