public static void Copy(string sourcePath, string destinationPath, bool overwrite)
{
if (Common.IsRunningOnMono() && Common.IsPlatformUnix()) SysFile.Copy(sourcePath, destinationPath, overwrite);
string normalizedSourcePath = Path.NormalizeLongPath(sourcePath, "sourcePath");
string normalizedDestinationPath = Path.NormalizeLongPath(destinationPath, "destinationPath");
if (!NativeMethods.CopyFile(normalizedSourcePath, normalizedDestinationPath, !overwrite))
throw Common.GetExceptionFromLastWin32Error();
}
It should be "return" or smth after SysFile.Copy. For example:
public static void Copy(string sourcePath, string destinationPath, bool overwrite)
{
if (Common.IsNotWindows())
{
SysFile.Copy(sourcePath, destinationPath, overwrite);
**return;**
}
string normalizedSourcePath = Path.NormalizeLongPath(sourcePath, "sourcePath");
string normalizedDestinationPath = Path.NormalizeLongPath(destinationPath, "destinationPath");
if (!NativeMethods.CopyFile(normalizedSourcePath, normalizedDestinationPath, !overwrite))
throw Common.GetExceptionFromLastWin32Error();
}
It should be "return" or smth after SysFile.Copy. For example: