File tree Expand file tree Collapse file tree
fspy_preload_windows/src/windows Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ( ) ) }
You can’t perform that action at this time.
0 commit comments