Logger now shows the actual path of the destination

Forgot to change this while changing the param from string to Storage
This commit is contained in:
Shivam 2020-07-02 00:32:09 +02:00
parent c3cd2a74f5
commit 66e61aacff
1 changed files with 3 additions and 3 deletions

View File

@ -36,16 +36,16 @@ public virtual void Migrate(Storage newStorage)
var destinationUri = new Uri(destination.FullName + Path.DirectorySeparatorChar);
if (sourceUri == destinationUri)
throw new ArgumentException("Destination provided is already the current location", nameof(newStorage));
throw new ArgumentException("Destination provided is already the current location", destination.FullName);
if (sourceUri.IsBaseOf(destinationUri))
throw new ArgumentException("Destination provided is inside the source", nameof(newStorage));
throw new ArgumentException("Destination provided is inside the source", destination.FullName);
// ensure the new location has no files present, else hard abort
if (destination.Exists)
{
if (destination.GetFiles().Length > 0 || destination.GetDirectories().Length > 0)
throw new ArgumentException("Destination provided already has files or directories present", nameof(newStorage));
throw new ArgumentException("Destination provided already has files or directories present", destination.FullName);
}
CopyRecursive(source, destination);