Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows#34270
Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows#34270bors merged 3 commits intorust-lang:masterfrom gkoz:error_file_exists
Conversation
|
How hard would it be to add a platform-independent test case for this (so it doesn't show up again)? |
|
Sorry, it's not obvious to me whether by 'this' you mean inaccurate |
|
I believe what @Stebalien means is could we add a test for this? Ideally one that runs on both Unix and Windows and both situations give us |
Ideally one that doesn't check for any specific platforms. |
|
Added a test. |
|
@bors: r+ 973ec7cfa9a14bc825102188e8ad40ff3d733cda Thanks! |
|
⌛ Testing commit 973ec7c with merge ccd3352... |
|
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
src/libstd/fs.rs
Outdated
There was a problem hiding this comment.
Apparently on Windows an this (creating a file when a directory exists) results in ErrorKind::PermissionDenied. Should I just not test this or make it conditional on !windows?
There was a problem hiding this comment.
It's fine to just omit this test if the PR is covered by the one above.
|
Removed fancy test cases. |
|
@bors: r+ |
|
📌 Commit 552afd3 has been approved by |
Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215 Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists
Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists