From bf8ef3dba12926695206d856818f650fab410c02 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 6 Mar 2026 08:38:48 -0800 Subject: [PATCH] Fix file manager listing current folder as entry within itself The find command included the starting directory in results (e.g., listing "workspace" inside /workspace). Replace `-not -name "."` with `-mindepth 1` which correctly excludes the starting path from output. Co-Authored-By: Claude Opus 4.6 --- app/src-tauri/src/commands/file_commands.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src-tauri/src/commands/file_commands.rs b/app/src-tauri/src/commands/file_commands.rs index 196e50a..37b2ef6 100644 --- a/app/src-tauri/src/commands/file_commands.rs +++ b/app/src-tauri/src/commands/file_commands.rs @@ -36,11 +36,10 @@ pub async fn list_container_files( let cmd = vec![ "find".to_string(), path.clone(), + "-mindepth".to_string(), + "1".to_string(), "-maxdepth".to_string(), "1".to_string(), - "-not".to_string(), - "-name".to_string(), - ".".to_string(), "-printf".to_string(), "%f\t%y\t%s\t%T@\t%m\n".to_string(), ];