cache: refactor after updating util

This commit is contained in:
David Allen 2024-10-15 15:25:42 -06:00
parent 036a5d3ab7
commit e87b2184a2
Signed by: towk
GPG key ID: 793B2924A49B3A3F

View file

@ -85,11 +85,9 @@ func DeleteScannedAssets(path string, results ...magellan.RemoteAsset) error {
func GetScannedAssets(path string) ([]magellan.RemoteAsset, error) { func GetScannedAssets(path string) ([]magellan.RemoteAsset, error) {
// check if path exists first to prevent creating the database // check if path exists first to prevent creating the database
exists, err := util.PathExists(path) _, exists := util.PathExists(path)
if !exists { if !exists {
return nil, fmt.Errorf("no file found") return nil, fmt.Errorf("no file found")
} else if err != nil {
return nil, err
} }
// now check if the file is the SQLite database // now check if the file is the SQLite database