[corlib] Fix FileInfo.MoveTo with same name.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 16 Feb 2016 11:17:19 +0000 (11:17 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 16 Feb 2016 11:17:19 +0000 (11:17 +0000)
commit80fd18926fec4970a6426eade59b0247547858af
tree060826bb77a2430262f9c6daa5a4923c42dbccca
parent83b7e81324a2cbc8909d5a4c57ff860f8a532150
[corlib] Fix FileInfo.MoveTo with same name.

FileInfo.MoveTo was not moving a file from one directory to another when
the file name did not change.

Fixes #18361.

An ArgumentException when destFileName is an empty array was added,
otherwise FileInfoTest.MoveTo_DestFileName_Empty would fail. Both
Path.GetFullPath and File.Move throw similar exceptions but
MoveTo_DestFileName_Empty expects the one from File.Move so it was added
to this method.
mcs/class/corlib/System.IO/FileInfo.cs