From 854b332af2cf0a09af5c5bb1a16ba6d7d71e5ad6 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Tue, 9 Dec 2014 11:30:38 +0100 Subject: [PATCH] Don't rewrite the version file if not needed - fixes #440, fixes #407 --- src/Paket.Core/RemoteDownload.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Paket.Core/RemoteDownload.fs b/src/Paket.Core/RemoteDownload.fs index 03f13c24ad..71bf23c04c 100644 --- a/src/Paket.Core/RemoteDownload.fs +++ b/src/Paket.Core/RemoteDownload.fs @@ -143,8 +143,9 @@ let DownloadSourceFile(rootPath, source:ModuleResolver.ResolvedSourceFile) = else tracefn "Downloading %s to %s" (source.ToString()) destination - CleanDir (destination |> Path.GetDirectoryName) + destination |> Path.GetDirectoryName |> CleanDir do! downloadRemoteFiles(source,destination) - File.WriteAllText(versionFile.FullName, source.Commit) + if not (versionFile.Exists && source.Commit = File.ReadAllText(versionFile.FullName)) then + File.WriteAllText(versionFile.FullName, source.Commit) } \ No newline at end of file