Hi all, I've been trying to contribute to cargo but ran into some weird Error issues.
Here is a minimal example I can muster. GitHub - Ygg01/minimal_copy_problem: Minimal folder problem with std:fs::copy
When running on Windows 10 and 11, I've encountered this bug, and I'm stumped.
Running 3 tests
test test_file_to_folder_with_backslash ... FAILED
test test_file_to_folder ... FAILED
test test_file_to_file ... ok
failures:
---- test_file_to_folder_with_backslash stdout ----
dest: "C:\\Users\\~~~~~\\RustroverProjects\\minimal_copy_problem\\target\\test2\\"
thread 'test_file_to_folder_with_backslash' panicked at src/main.rs:62:10:
Failed to copy from "C:\\Users\\~~~~~\\RustroverProjects\\minimal_copy_problem\\README.md" to "C:\\Users\\~~~~~\\RustroverProjects\\minimal_copy_problem\\target\\test2\\": Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- test_file_to_folder stdout ----
thread 'test_file_to_folder' panicked at src/main.rs:40:10:
Failed to copy from "C:\\Users\\~~~~~\\RustroverProjects\\minimal_copy_problem\\README.md" to "C:\\Users\\~~~~~\\RustroverProjects\\minimal_copy_problem\\target\\test2": Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
failures:
test_file_to_folder
test_file_to_folder_with_backslash
test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass `--bin minimal_copy_problem`
Steps I did take:
- Enable developer mode
- Turned on symlinks for git using
git config --global core.symlinks true
- Checked that long paths are enabled in the Registry (although I didn't check the app manifest, if that even exists for cargo)
So my questions are as follows:
- Can some of people on Windows with Rust and msvc backend reproduce these issues?
- Am I missing some obvious setting that would make it work on my Windows box?