Skip to content
  • Joey Hess's avatar
    assistant: Fix a race condition that could cause a pointer file to get ingested into the annex · 12a0ca96
    Joey Hess authored
    This was caused by commit fb8ab246 putting
    an isPointerFile check in the wrong place. So if the file was not a pointer
    file at that point, but got replaced by one before the file got locked
    down, the pointer file would be ingested into the annex.
    
    The fix is simply to move the isPointerFile check to after safeToAdd locks
    down the file. Now if the file changes to a pointer file after the
    isPointerFile check, ingestion will see that it changed after lockdown,
    and will refuse to add it to the annex.
    
    Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
    12a0ca96
To find the state of this project's repository at the time of any of these versions, check out the tags.