Use sha1 instead of crc

This commit is contained in:
Flaviu Tamas 2015-05-23 14:34:11 -04:00
commit e9516e6308
4 changed files with 197 additions and 96 deletions

View file

@ -585,13 +585,11 @@ proc externalFileChanged(filename: string): bool =
return false
var crcFile = toGeneratedFile(filename.withPackageName, "crc")
var currentCrc = int(footprint(filename))
var currentCrc = footprint(filename)
var f: File
if open(f, crcFile, fmRead):
var line = newStringOfCap(40)
if not f.readLine(line): line = "0"
let oldCrc = parseSecureHash(f.readLine())
close(f)
var oldCrc = parseInt(line)
result = oldCrc != currentCrc
else:
result = true