Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to regenerate invalid seed indexes #216

Merged
merged 2 commits into from
Apr 3, 2022

Commits on Apr 3, 2022

  1. Add option to regenerate invalid seed indexes

    Sometimes we don't have the guarantee that a particular seed index is
    always valid.
    For example if a seed index is calculated and used in two different
    occasions, it might happen that in the meantime some of the seed files
    got corrupted or that they simply changed (if the seed is a writable
    location).
    
    One workaroud is to manually launch `verify-index` and then regenerate
    the index if that check fails. However this involves additional steps
    and is potentially slower because we need to verify the entire seed
    before running the `extract` command.
    
    Instead with the new option "--regenerate-invalid-seeds", Desync will
    automatically regenerate the seed index if the validation step fails.
    
    Signed-off-by: Ludovico de Nittis <[email protected]>
    RyuzakiKK committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    22d39af View commit details
    Browse the repository at this point in the history
  2. Add the correct seed in the extract test

    This test usually worked because "blob2.caibx" was considered before
    "blob2_corrupted.cabix". However this test was expecting to use
    "blob1.caibx", but that was not the case because in `readSeedDirs()` the
    index file is skipped if it is what we have set in input.
    
    Instead, we add it explicitly to force "blob1.caibx" as a seed.
    
    Signed-off-by: Ludovico de Nittis <[email protected]>
    RyuzakiKK committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    741c26c View commit details
    Browse the repository at this point in the history