From fa2632eda97b3bc64370648efa4c5084da4de1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20=C4=90=E1=BB=A9c=20To=C3=A0n?= <33489972+ndtoan96@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:26:25 +0700 Subject: [PATCH] feat: allow both '/' and '\' in folder creation (#751) --- 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 22490ba5..ba04c443 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();