2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 21:05:10 +00:00

prune: Improve error message for missing files

This commit changes the error message so that a list of file names is
printed. Before, just the raw map was printed, which is not a great user
interface.
This commit is contained in:
Alexander Neumann 2021-01-31 11:31:27 +01:00
parent 0e5f2fff71
commit 027a51529d

View File

@ -383,7 +383,10 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB
}
if len(indexPack) != 0 {
Warnf("The index references needed pack files which are missing from the repository: %v\n", indexPack)
Warnf("The index references %d needed pack files which are missing from the repository:\n", len(indexPack))
for id := range indexPack {
Warnf(" %v\n", id)
}
return errorPacksMissing
}
if len(ignorePacks) != 0 {