From 49b41624485637161a996add0ae3671403e5fbfa Mon Sep 17 00:00:00 2001 From: 409 <409dev@protonmail.com> Date: Thu, 4 Sep 2025 01:33:30 +0200 Subject: [PATCH] fix file system cat prefix determination --- backend/src/lib/outbound/file_system.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/src/lib/outbound/file_system.rs b/backend/src/lib/outbound/file_system.rs index 2992ea8..cb477f8 100644 --- a/backend/src/lib/outbound/file_system.rs +++ b/backend/src/lib/outbound/file_system.rs @@ -626,6 +626,15 @@ impl PathRequest { } } + let lowest_common_prefix = if let Some(last_slash_index) = lowest_common_prefix.rfind("/") + && last_slash_index > 1 + { + lowest_common_prefix.truncate(last_slash_index); + lowest_common_prefix + } else { + lowest_common_prefix + }; + Ok(Self::Multiple { lowest_common_prefix, paths: input_paths,