From f0fca3d7f34814a8a3cf5d3be3578f747ecda562 Mon Sep 17 00:00:00 2001 From: Benjamin Weinstein-Raun Date: Mon, 24 Mar 2025 04:00:16 -0700 Subject: fixes #1884: HISTFILE can be a directory or a file (#2630) Xonsh history import was failing (in the default xonsh configuration) because $HISTFILE is actually a directory in that case. This change sets up the xonsh import to check for a *directory* instead of a regular file, and makes it clearer that other importers expect a regular file. --- crates/atuin-client/src/import/resh.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/atuin-client/src/import/resh.rs') diff --git a/crates/atuin-client/src/import/resh.rs b/crates/atuin-client/src/import/resh.rs index 1be23396..de02d041 100644 --- a/crates/atuin-client/src/import/resh.rs +++ b/crates/atuin-client/src/import/resh.rs @@ -8,7 +8,7 @@ use serde::Deserialize; use atuin_common::utils::uuid_v7; use time::OffsetDateTime; -use super::{Importer, Loader, get_histpath, unix_byte_lines}; +use super::{Importer, Loader, get_histfile_path, unix_byte_lines}; use crate::history::History; use crate::import::read_to_end; @@ -85,7 +85,7 @@ impl Importer for Resh { const NAME: &'static str = "resh"; async fn new() -> Result { - let bytes = read_to_end(get_histpath(default_histpath)?)?; + let bytes = read_to_end(get_histfile_path(default_histpath)?)?; Ok(Self { bytes }) } -- cgit v1.3.1