recreate directory when emptied

This commit is contained in:
Niko Storni 2019-07-10 17:42:28 +02:00
parent 173e62d286
commit 87f7d4c9f9

View file

@ -109,7 +109,12 @@ func cleanupLbrynet() error {
return errors.Err(err)
}
}
err = os.RemoveAll(lbrynetDir + "/blobfiles/")
blobsDir := lbrynetDir + "/blobfiles/"
err = os.RemoveAll(blobsDir)
if err != nil {
return errors.Err(err)
}
err = os.Mkdir(blobsDir, 0755)
if err != nil {
return errors.Err(err)
}