Skip to content

Commit

Permalink
Fix for fsprojects#592
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon committed Feb 9, 2015
1 parent 357b1cc commit 1b76f1e
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 1b76f1e

Please sign in to comment.