Ignore missing rows when removing files from cache db

This commit is contained in:
Ming Ming 2023-03-27 00:22:18 +08:00
parent 895e167a77
commit edebc64824

View file

@ -720,8 +720,14 @@ class FileCachedDataSource implements FileDataSource {
@override @override
remove(Account account, File f) async { remove(Account account, File f) async {
await _sqliteDbSrc.remove(account, f);
await _remoteSrc.remove(account, f); await _remoteSrc.remove(account, f);
try {
await _sqliteDbSrc.remove(account, f);
} catch (e, stackTrace) {
// ignore cache failure
_log.warning(
"Failed while remove: ${logFilename(f.strippedPath)}", e, stackTrace);
}
} }
@override @override