From cf97f7baeb961485f03f5c5ea4dc5d80c1fa9d49 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Thu, 25 Apr 2013 22:07:32 +0200 Subject: [PATCH] Fixed logic to handle partially written files --- Duplicati/Library/Main/ForestHash/ForestHash.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/Main/ForestHash/ForestHash.cs b/Duplicati/Library/Main/ForestHash/ForestHash.cs index adf429b15..5f003e6d9 100644 --- a/Duplicati/Library/Main/ForestHash/ForestHash.cs +++ b/Duplicati/Library/Main/ForestHash/ForestHash.cs @@ -113,9 +113,9 @@ namespace Duplicati.Library.Main.ForestHash else { Volumes.IParsedVolume r; - if (!lookup.TryGetValue(i.Name, out r) || (r.File.Size != i.Size && r.File.Size >= 0 && i.Size >= 0)) + if (!lookup.TryGetValue(i.Name, out r)) { - if (i.State == RemoteVolumeState.Uploading || i.State == RemoteVolumeState.Deleting) + if (i.State == RemoteVolumeState.Uploading || i.State == RemoteVolumeState.Deleting || (r.File.Size != i.Size && r.File.Size >= 0 && i.Size >= 0)) { database.LogMessage("info", string.Format("removing file listed as {0}: {1}", i.State, i.Name), null, null); database.RemoveRemoteVolume(i.Name, null);