cunarist / rinf

Rust for native business logic, Flutter for flexible and beautiful GUI
MIT License
1.88k stars 65 forks source link

Path resolving issue #321

Closed TheTharin closed 4 months ago

TheTharin commented 4 months ago

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 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:

  1. when I run specs with cargo test, everything is fine and current_dir is "/Users/me/work/my_app/native/hub"
  2. 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)