mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 16:38:33 +00:00
Use full file path for CRC checks.
Ref nim-lang/nimsuggest#6. Ref nim-lang/nimsuggest#4.
This commit is contained in:
@@ -51,19 +51,19 @@ proc crcChanged(fileIdx: int32): bool =
|
||||
of crcNotChanged:
|
||||
result = false
|
||||
of crcCached:
|
||||
let newCrc = secureHashFile(fileIdx.toFilename)
|
||||
let newCrc = secureHashFile(fileIdx.toFullPath)
|
||||
result = newCrc != gMemCacheData[fileIdx].crc
|
||||
gMemCacheData[fileIdx].crc = newCrc
|
||||
updateStatus()
|
||||
of crcNotTaken:
|
||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFilename)
|
||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFullPath)
|
||||
result = true
|
||||
updateStatus()
|
||||
|
||||
proc doCRC(fileIdx: int32) =
|
||||
if gMemCacheData[fileIdx].crcStatus == crcNotTaken:
|
||||
# echo "FIRST CRC: ", fileIdx.ToFilename
|
||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFilename)
|
||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFullPath)
|
||||
|
||||
proc addDep(x: PSym, dep: int32) =
|
||||
growCache gMemCacheData, dep
|
||||
|
||||
Reference in New Issue
Block a user