mirror of https://github.com/ppy/osu
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:
parent
c3cd2a74f5
commit
66e61aacff
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue