Skip to content

Commit

Permalink
ffi: align rust_style_path with node_style_path (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash authored Sep 23, 2024
1 parent 0b9b1e3 commit d47a98e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/moonrun/src/fs_api_temp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ fn read_dir(

for entry in entries {
if let Ok(entry) = entry {
let path = entry.path();
if let Some(path_str) = path.to_str() {
let rust_style_path = entry.path();
let node_style_path = rust_style_path.strip_prefix(&path).unwrap();
if let Some(path_str) = node_style_path.to_str() {
let js_string = v8::String::new(scope, path_str).unwrap();
result.set_index(scope, index, js_string.into()).unwrap();
index += 1;
Expand Down

0 comments on commit d47a98e

Please sign in to comment.