Uh oh!
There was an error while loading. Please reload this page.
fix: Directory.Move fails on Windows if destination has different case from source - #1256
Conversation
vbreuss
left a comment
There was a problem hiding this comment.
I don't understand why we would need this, as this method should only be a wrapper around the native Directory.Move. The idea of this library is to not change the behaviour of the underlying file system!
I added this check to handle this issue As it states, the wrapper class and the mock class differ in behaviour. |
vbreuss
commented
Mar 31, 2025
@oni-shiro: I assigned #1138 to you. |
d6051d5 to
f46f5d6Compareoni-shiro
commented
Apr 5, 2025
Sure will do that. |
f46f5d6 to
bd19fcdCompareoni-shiro
commented
Apr 13, 2025
Added the test, removed two outdated tests that does not align with this change. @vbreuss |
vbreuss
left a comment
There was a problem hiding this comment.
@oni-shiro I fear you misunderstood #1138. It mentions only the case that source and destination differ in casing and only on windows. You should not remove the existing test cases, as they verify the correct behavior in other cases that should not be changed.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d843e9d to
1778c08Compareoni-shiro
commented
Apr 15, 2025
Thank you @vbreuss for pointing my mistake 👍. I have made new changes, for this I had to add another Let me know your thoughts. |
0863aad to
b526929Comparevbreuss
commented
Apr 16, 2025
I don't like this additional overload in the |
oni-shiro
commented
Apr 16, 2025
I was not keen on using Both StringOperations.Equals, and string.Equals simultaneously to avoid any confusion. But I understand your point, I will revert the change for that. |
oni-shiro
commented
Apr 16, 2025
Reverted the public api related changes on 402f597 |
vbreuss
left a comment
There was a problem hiding this comment.
Thanks, @oni-shiro, I only have some minor suggestions.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Directory.Move fails on Windows if destination has different case from source
vbreuss
left a comment
There was a problem hiding this comment.
I adjusted the title and description, as they were no longer up-to-date.
The PR looks good to me. Will release it shortly!

This PR address the issue #1138:
On Windows,
MockFileSystem.Directory.Moveno longer throws aSystem.IO.IOExceptionwhen source and destination path only differ in casing.