uidev: support external paths

This commit is contained in:
galister
2025-12-06 12:01:51 +09:00
parent d50b3b6da7
commit e83997bc08
3 changed files with 19 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
use flate2::read::GzDecoder;
use std::ffi::OsStr;
use std::io::Read;
use std::path::{Path, PathBuf};
@@ -96,6 +97,9 @@ pub fn normalize_path(path: &Path) -> PathBuf {
std::path::Component::Normal(name) => {
stack.push(name);
}
std::path::Component::RootDir => {
stack.push(OsStr::new(std::path::MAIN_SEPARATOR_STR));
}
_ => {}
}
}