Handle unhandled error; remove error handling in server-only function (error would never become visible to user)

This commit is contained in:
2025-06-01 12:35:07 -04:00
parent 4dab9f2c93
commit 2e3be57e3e
3 changed files with 8 additions and 13 deletions
+4 -1
View File
@@ -37,7 +37,10 @@ func EntryRefresh(oldRCWPassphrase, newRCWPassphrase []byte, removeOldDir bool)
return errors.New("unable to refresh entries: \"" + global.EntryRoot + "-old\" already exists")
}
}
os.RemoveAll(global.EntryRoot + dirEnd)
err := os.RemoveAll(global.EntryRoot + dirEnd)
if err != nil {
return errors.New("unable to remove \"" + global.EntryRoot + dirEnd + "\": " + err.Error())
}
}
// create output directory structure (global.EntryRoot + "-new"/*)