Use full file path for CRC checks.
Ref nim-lang/nimsuggest#6. Ref nim-lang/nimsuggest#4.
This commit is contained in:
parent
2f68b0baf0
commit
0e4e187476
1 changed files with 3 additions and 3 deletions
|
|
@ -51,19 +51,19 @@ proc crcChanged(fileIdx: int32): bool =
|
||||||
of crcNotChanged:
|
of crcNotChanged:
|
||||||
result = false
|
result = false
|
||||||
of crcCached:
|
of crcCached:
|
||||||
let newCrc = secureHashFile(fileIdx.toFilename)
|
let newCrc = secureHashFile(fileIdx.toFullPath)
|
||||||
result = newCrc != gMemCacheData[fileIdx].crc
|
result = newCrc != gMemCacheData[fileIdx].crc
|
||||||
gMemCacheData[fileIdx].crc = newCrc
|
gMemCacheData[fileIdx].crc = newCrc
|
||||||
updateStatus()
|
updateStatus()
|
||||||
of crcNotTaken:
|
of crcNotTaken:
|
||||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFilename)
|
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFullPath)
|
||||||
result = true
|
result = true
|
||||||
updateStatus()
|
updateStatus()
|
||||||
|
|
||||||
proc doCRC(fileIdx: int32) =
|
proc doCRC(fileIdx: int32) =
|
||||||
if gMemCacheData[fileIdx].crcStatus == crcNotTaken:
|
if gMemCacheData[fileIdx].crcStatus == crcNotTaken:
|
||||||
# echo "FIRST CRC: ", fileIdx.ToFilename
|
# echo "FIRST CRC: ", fileIdx.ToFilename
|
||||||
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFilename)
|
gMemCacheData[fileIdx].crc = secureHashFile(fileIdx.toFullPath)
|
||||||
|
|
||||||
proc addDep(x: PSym, dep: int32) =
|
proc addDep(x: PSym, dep: int32) =
|
||||||
growCache gMemCacheData, dep
|
growCache gMemCacheData, dep
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue