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 sxyazi
parent 8508a5f577
commit fa2632eda9
No known key found for this signature in database

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