Merge pull request #266 from lbryio/blob-delete-revisited
do not delete the sd hash blob when deleting file blobs
This commit is contained in:
commit
a5b67d4923
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ export function doUpdateLoadStatus(uri, outpoint) {
|
||||||
|
|
||||||
// Once a download has been completed, delete the individual blob files to save space
|
// Once a download has been completed, delete the individual blob files to save space
|
||||||
Lbry.blob_list({ sd_hash: fileInfo.sd_hash }).then(hashes => {
|
Lbry.blob_list({ sd_hash: fileInfo.sd_hash }).then(hashes => {
|
||||||
hashes.forEach(hash => {
|
hashes.filter(hash => hash != fileInfo.sd_hash).forEach(hash => {
|
||||||
Lbry.blob_delete({ blob_hash: hash });
|
Lbry.blob_delete({ blob_hash: hash });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -325,7 +325,7 @@ export function doDeleteCompleteBlobs() {
|
||||||
files.forEach(fileInfo => {
|
files.forEach(fileInfo => {
|
||||||
if (fileInfo.completed) {
|
if (fileInfo.completed) {
|
||||||
Lbry.blob_list({ sd_hash: fileInfo.sd_hash }).then(hashes => {
|
Lbry.blob_list({ sd_hash: fileInfo.sd_hash }).then(hashes => {
|
||||||
hashes.forEach(hash => {
|
hashes.filter(hash => hash != fileInfo.sd_hash).forEach(hash => {
|
||||||
Lbry.blob_delete({ blob_hash: hash });
|
Lbry.blob_delete({ blob_hash: hash });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue