feat: allow both '/' and '\' in folder creation (#751)

This commit is contained in:
Nguyễn Đức Toàn 2024-03-01 10:26:25 +07:00 committed by Anton Simonov
parent 47be6e2198
commit ee5e7cf2d2

View file

@ -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?; fs::create_dir_all(&path).await?;
} else { } else {
fs::create_dir_all(&path.parent().unwrap()).await.ok(); fs::create_dir_all(&path.parent().unwrap()).await.ok();