diff --git a/Duplicati/Library/Backend/File/FileBackend.cs b/Duplicati/Library/Backend/File/FileBackend.cs index a2b005458..79c410e26 100644 --- a/Duplicati/Library/Backend/File/FileBackend.cs +++ b/Duplicati/Library/Backend/File/FileBackend.cs @@ -234,7 +234,7 @@ namespace Duplicati.Library.Backend } else { - systemIO.FileCopy(sourceFilePath, targetFilePath, true); + systemIO.FileCopy(sourceFilePath, targetFilePath, true); if (m_verifyDestinationLength) VerifyMatchingSize(targetFilePath, sourceFilePath); } @@ -347,7 +347,12 @@ namespace Duplicati.Library.Backend System.IO.DriveInfo driveInfo = this.GetDrive(); if (driveInfo != null) { - return new QuotaInfo(driveInfo.TotalSize, driveInfo.AvailableFreeSpace); + // Check that the total space is above 0, because Mono sometimes reports 0 for unknown file systems + // If the drive actually has a total size of 0, this should be obvious immediately due to write errors + if (driveInfo.TotalSize > 0) + { + return new QuotaInfo(driveInfo.TotalSize, driveInfo.AvailableFreeSpace); + } } if (Platform.IsClientWindows)