Directory move fix (dotnet/corefx#40570)
authorJacob Lalonde <jjjlalonde@gmail.com>
Wed, 6 Nov 2019 23:30:38 +0000 (18:30 -0500)
committerJeremy Kuhne <jkuhne@microsoft.com>
Wed, 6 Nov 2019 23:30:38 +0000 (15:30 -0800)
commitf576bd51a980460ee407c3b35cafcc607efacd62
tree5bf126b102921b13745773d5bdff7392a13e205b
parentc645a5bb7388dc1d6f64f158d03d3602c65d4e5f
Directory move fix (dotnet/corefx#40570)

* Fix to support case-insensitive directory moving/renaming

* More tests for other directories

* Include throwing win32 exp upon directory already existing

* Added ) that I dropped in previous rebase

* Directory get with pattern to check for case sensitivity

* Error message fix

* Rework to support multiple edge cases

* Rework to only support moving to the same directory case insentivity

* Handle situations for case-sensitive file systems

* Test changes

* Stopped modifying environment's current directory

* Cleanup, and tests for drive differences

* Only set route to lower, but only only compare roots ordinally

* Add additional if to check if any directory with that name exists

* Edit to what path to use

* Use destination path.

* Rework file directory scan

* Make utility function due to Any() with empty returning true

* Get the full path before getting the filename

* Check if the directory name is null or empty

* Removed extra line

* Now Defering to the OS for if the directory already exists

* Remove extra semi-colon

* Test Edit

* Comment edit

* Actually test the functionality the test is built for

* Remove platform specific tests and make them platform agnostic

* Target only OSX

* Target all platforms other than linux itself

* Changed how we detect case variants

* Remove unix specific test

* Convert OSX test into no-op test

* Code review feedback and additional tests

* Case-Sensitive file systems specific tests

* Fix to not include osx with other unixes

* Removed a ,

Commit migrated from https://github.com/dotnet/corefx/commit/e9ce2f734698ab5bf13f947c281fa4bec67b0216
src/libraries/System.IO.FileSystem/src/System/IO/Directory.cs
src/libraries/System.IO.FileSystem/src/System/IO/FileSystem.Windows.cs
src/libraries/System.IO.FileSystem/tests/Directory/Move.cs