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 <noreply@anthropic.com>
This commit is contained in:
@@ -36,11 +36,10 @@ pub async fn list_container_files(
|
|||||||
let cmd = vec![
|
let cmd = vec![
|
||||||
"find".to_string(),
|
"find".to_string(),
|
||||||
path.clone(),
|
path.clone(),
|
||||||
|
"-mindepth".to_string(),
|
||||||
|
"1".to_string(),
|
||||||
"-maxdepth".to_string(),
|
"-maxdepth".to_string(),
|
||||||
"1".to_string(),
|
"1".to_string(),
|
||||||
"-not".to_string(),
|
|
||||||
"-name".to_string(),
|
|
||||||
".".to_string(),
|
|
||||||
"-printf".to_string(),
|
"-printf".to_string(),
|
||||||
"%f\t%y\t%s\t%T@\t%m\n".to_string(),
|
"%f\t%y\t%s\t%T@\t%m\n".to_string(),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user