Conversation
Deleting files returns STATUS_INVALID_PARAMETE on a bind mounted file system in hyper-v container with FILE_DISPOSITION_POSIX_SEMANTICS. Therefore fall back to default method. This code is suggeted by dscho and I change it more simple.
Renaming files returns STATUS_INVALID_PARAMETE on a bind mounted file system in hyper-v container with FILE_RENAME_POSIX_SEMANTICS. Disable the use_posix_semantics flag and retry.
|
I assume this issue also exists in upstream Cygwin. It might make sense to send this patch upstream to cygwin-patches@cygwin.com and get their opinions/ideas, and hopefully get something applied there first. |
This is the thing I was stuck on, your solution seems neat to me. |
eb30798 to
a796047
Compare
a796047 to
749d3a2
Compare
|
I updated test https://ci.appveyor.com/project/YO4/test-msys2-in-container/builds/46532757 |
|
For lurkers, the Cygwin contribution can be seen here. |
|
@YO4 personally, I'd love to see the changes backported early into the MSYS2 runtime (once the jury has decided on |
|
Hmmm, I saw https://github.com/msys2/msys2-runtime/tags and mistakenly assumed that msys2-runtime would not be updated until cygwin's next release. |
I see that the upstream version is slightly different: 87ab6c7#diff-bf890865130314cb545fec4788e41d9daa5dd8832a21435c6556619d5578a8aaL740-R744 does not look like 749d3a2#diff-bf890865130314cb545fec4788e41d9daa5dd8832a21435c6556619d5578a8aaR739-R741 Other than that, I am totally in favor of merging it and incrementing the |
AJDurant
left a comment
There was a problem hiding this comment.
@YO4 can you make the change that @dscho mentioned in #141 (comment) so this can get merged?
| goto out; | ||
| debug_printf ("NtSetInformationFile (%S, FileDispositionInformationEx)" | ||
| " returns %y with posix semantics. Disable it and retry.", | ||
| pc.get_nt_native_path (), status); |
There was a problem hiding this comment.
| goto out; | |
| debug_printf ("NtSetInformationFile (%S, FileDispositionInformationEx)" | |
| " returns %y with posix semantics. Disable it and retry.", | |
| pc.get_nt_native_path (), status); | |
| { | |
| debug_printf ("NtSetInformationFile returns %y " | |
| "with posix semantics. Disable it and retry.", status); | |
| goto out; | |
| } |
#59 complains that remove does not work in docker volume folder.
That seems to mounted folder does not support *_POSIX_SEMANTICS functions in hyper-v container.
https://ci.appveyor.com/project/YO4/test-msys2-in-container/builds/46432262
Since it is unclear how to determine in advance whether posix semantics will work, fall back to the conventional method when an error occurs.
Functions affected are unlink(), rename(), and their derivatives.