mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 09:09:03 +03:00
fix: panic on PROPFIND // (#144)
This commit is contained in:
@@ -897,7 +897,11 @@ impl Server {
|
||||
}
|
||||
|
||||
fn extract_path(&self, path: &str) -> Option<PathBuf> {
|
||||
let decoded_path = decode_uri(&path[1..])?;
|
||||
let mut slash_stripped_path = path;
|
||||
while let Some(p) = slash_stripped_path.strip_prefix('/') {
|
||||
slash_stripped_path = p
|
||||
}
|
||||
let decoded_path = decode_uri(slash_stripped_path)?;
|
||||
let slashes_switched = if cfg!(windows) {
|
||||
decoded_path.replace('/', "\\")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user