mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
[pitboss/grind] deferred session-0009 (20260520T233019Z-6958)
This commit is contained in:
parent
a6f34554db
commit
38cc0ce05f
60 changed files with 509 additions and 541 deletions
|
|
@ -341,11 +341,10 @@ impl SurfaceMap {
|
|||
/// Returns the absolute path verbatim when the file is outside the
|
||||
/// scan root or when path stripping fails.
|
||||
pub fn relative_path_string(path: &Path, scan_root: Option<&Path>) -> String {
|
||||
if let Some(root) = scan_root {
|
||||
if let Ok(rel) = path.strip_prefix(root) {
|
||||
if let Some(root) = scan_root
|
||||
&& let Ok(rel) = path.strip_prefix(root) {
|
||||
return rel.to_string_lossy().replace('\\', "/");
|
||||
}
|
||||
}
|
||||
path.to_string_lossy().replace('\\', "/")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue