Torrent: don't drop db on "torrent_hashes --rebuild" #4118 Open

This commit is contained in:
Alex Sharov 2022-05-11 14:38:37 +07:00 committed by GitHub
parent 0fd12743e7
commit 45adf8fba9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,7 @@ var printTorrentHashes = &cobra.Command{
}
if forceRebuild { // remove and create .torrent files (will re-read all snapshots)
removePieceCompletionStorage(snapshotDir)
//removePieceCompletionStorage(snapshotDir)
files, err := downloader.AllTorrentPaths(snapshotDir)
if err != nil {
return err
@ -232,6 +232,7 @@ var printTorrentHashes = &cobra.Command{
},
}
//nolint
func removePieceCompletionStorage(snapshotDir string) {
_ = os.RemoveAll(filepath.Join(snapshotDir, "db"))
_ = os.RemoveAll(filepath.Join(snapshotDir, ".torrent.db"))