Hello! I'm fairly new to Flutter and Rust ecosystem. I'm writing my app and I have problems with accessing files through Path::new() in Rust. Tests for my code run okay, but the actual code panics with No such file or directory from a library I pass my Path to. I started digging with env::current_dir().unwrap() and that's what I found:
when I run specs with cargo test, everything is fine and current_dir is "/Users/me/work/my_app/native/hub"
when I run the app from within VSCode, current_dir returns "/Users/me/Library/Containers/com.example.myApp/Data" and I can't seem to find a way to navigate into native/hub from there.
Would you be so kind to give me an advice on that?
System Information
OS X Ventura 13.4
rustc 1.77.2 (25ef9e3d8 2024-04-09)
Flutter (Channel stable, 3.19.6, on macOS 13.4 22F66 darwin-arm64, locale en-GB)
Report
Hello! I'm fairly new to Flutter and Rust ecosystem. I'm writing my app and I have problems with accessing files through
Path::new()
in Rust. Tests for my code run okay, but the actual code panics withNo such file or directory
from a library I pass my Path to. I started digging withenv::current_dir().unwrap()
and that's what I found:cargo test
, everything is fine andcurrent_dir
is"/Users/me/work/my_app/native/hub"
current_dir
returns"/Users/me/Library/Containers/com.example.myApp/Data"
and I can't seem to find a way to navigate intonative/hub
from there.Would you be so kind to give me an advice on that?
System Information
OS X Ventura 13.4 rustc 1.77.2 (25ef9e3d8 2024-04-09) Flutter (Channel stable, 3.19.6, on macOS 13.4 22F66 darwin-arm64, locale en-GB)