We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6ddf4e commit 18a552eCopy full SHA for 18a552e
lib/wasi/src/syscalls/mod.rs
@@ -2649,6 +2649,13 @@ pub fn path_rename<M: MemorySize>(
2649
}
2650
2651
2652
+ // this is to be sure the source file is fetch from filesystem if needed
2653
+ wasi_try!(state.fs.get_inode_at_path(
2654
+ inodes.deref_mut(),
2655
+ old_fd,
2656
+ source_path.to_str().as_ref().unwrap(),
2657
+ true
2658
+ ));
2659
let (source_parent_inode, source_entry_name) =
2660
wasi_try!(state
2661
.fs
@@ -2657,7 +2664,6 @@ pub fn path_rename<M: MemorySize>(
2664
2665
2666
.get_parent_inode_at_path(inodes.deref_mut(), new_fd, target_path, true));
-
2667
let host_adjusted_target_path = {
2662
2668
let guard = inodes.arena[target_parent_inode].read();
2663
2669
let deref = guard.deref();
0 commit comments