From de02eb93eab9729e529718f2747b04e0cb83d2a4 Mon Sep 17 00:00:00 2001 From: Nguyen Duc Toan Date: Wed, 28 Feb 2024 20:07:26 +0700 Subject: [PATCH] allow both '/' and '' in folder creation --- yazi-core/src/manager/commands/create.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-core/src/manager/commands/create.rs b/yazi-core/src/manager/commands/create.rs index 7320fd5d..4b5c54ce 100644 --- a/yazi-core/src/manager/commands/create.rs +++ b/yazi-core/src/manager/commands/create.rs @@ -32,7 +32,7 @@ impl Manager { } } - if name.ends_with(MAIN_SEPARATOR) { + if name.ends_with('/') || name.ends_with('\\') { fs::create_dir_all(&path).await?; } else { fs::create_dir_all(&path.parent().unwrap()).await.ok();