Skip to content

Commit 5a24ba5

Browse files
committed
fix
1 parent 1b81ed0 commit 5a24ba5

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

crates/fspy/tests/oxlint.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ async fn oxlint_reads_directory() -> anyhow::Result<()> {
7373
// on macOS, tmpdir.path() may be a symlink, so we need to canonicalize it
7474
let tmpdir_path = std::fs::canonicalize(tmpdir.path())?;
7575

76-
let js_file = tmpdir.path().join("test.js");
77-
std::fs::write(&js_file, "console.log('hello');")?;
78-
7976
let accesses = track_oxlint(&tmpdir_path, &[]).await?;
8077

8178
// Check that oxlint read the directory to find JS files

crates/fspy_preload_windows/src/windows/convert.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ impl ToAbsolutePath for POBJECT_ATTRIBUTES {
6363
let Ok(mut root_dir) = (unsafe { get_path_name((*self).RootDirectory) }) else {
6464
return f(None);
6565
};
66+
// If filename is empty, just use root_dir directly
67+
if filename_str.is_empty() {
68+
let root_dir_str = U16Str::from_slice(&root_dir);
69+
return f(Some(root_dir_str));
70+
}
6671
let root_dir_cstr = {
6772
root_dir.push(0);
6873
unsafe { U16CStr::from_ptr_str(root_dir.as_ptr()) }

0 commit comments

Comments
 (0)