Files
dotnet-runtime/src/libraries/System.IO.FileSystem
Jeremy Kuhne 08efda5998 Fix using Directory to move files (dotnet/corefx#19716)
* Fix using Directory to move files

See dotnet/corefx#19710. NetFX behavior is that you can use Directory
to move files. This was broken trying to match other legacy
behavior in dotnet/corefx#17913. Tested on NetFX and CoreFX.

* Fix check for Unix

Unix impl doesn't tolerate a trailing separator. Public api
explicitly checks for this.

* More fixes and tests

Unix won't move the file with a trailing slash. Add more tests
for different combinations of trailing slashes. Validated against
NetFX.

* Attempt to get MoveDirectory further aligned

Trying to handle trailing separator on a source file cases
in the same way as Windows.

* Extend tests, move Unix condition

* Another tweak and more tests

* Fix comment


Commit migrated from https://github.com/dotnet/corefx/commit/ea514e2f4e61bd3128ea3753071af2681f17f063
2017-05-12 19:21:10 -07:00
..