Skip to content

Commit

Permalink
Merge pull request #593 from sergey-tihon/master
Browse files Browse the repository at this point in the history
Fix for #592
  • Loading branch information
forki committed Feb 12, 2015
2 parents f18ee42 + 1b76f1e commit bbc70be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Paket.Core/RemoteDownload.fs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ let DownloadSourceFiles(rootPath, sourceFiles:ModuleResolver.ResolvedSourceFile
|> Seq.sortBy (fst >> fst)
|> Seq.map (fun ((destinationDir, version), sources) ->
let versionFile = FileInfo(Path.Combine(destinationDir, Constants.PaketVersionFileName))
let isInRightVersion = versionFile.Exists && version = File.ReadAllText(versionFile.FullName)
let isInRightVersion = versionFile.Exists && File.ReadAllText(versionFile.FullName).Contains(version)

if not isInRightVersion then
CleanDir destinationDir
Expand All @@ -165,6 +165,7 @@ let DownloadSourceFiles(rootPath, sourceFiles:ModuleResolver.ResolvedSourceFile
})
|> Async.Parallel

File.WriteAllText(versionFile.FullName, version)
if not <| File.ReadAllText(versionFile.FullName).Contains(version)
then File.AppendAllLines(versionFile.FullName, [version])
})
|> Async.Parallel

0 comments on commit bbc70be

Please sign in to comment.