Skip to content

Commit ce00ecc

Browse files
committed
fix is_absolute logic
1 parent 803c069 commit ce00ecc

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crates/fspy_preload_windows/src/windows/convert.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ impl ToAbsolutePath for POBJECT_ATTRIBUTES {
5656
U16Str::from_slice(&[])
5757
};
5858
let filename_slice = filename_str.as_slice();
59-
let is_absolute = (filename_slice.get(0) == Some(&b'\\'.into())
60-
&& filename_slice.get(1) == Some(&b'\\'.into())) // \\...
59+
let is_absolute = filename_slice.get(0) == Some(&b'\\'.into()) // \...
6160
|| filename_slice.get(1) == Some(&b':'.into()); // C:...
6261

63-
if is_absolute {
62+
if !is_absolute {
6463
let Ok(mut root_dir) = (unsafe { get_path_name((*self).RootDirectory) }) else {
6564
return f(None);
6665
};

0 commit comments

Comments
 (0)