mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
Fix all_checksums() for media import
Entries of deleted files are nulled, not removed.
This commit is contained in:
parent
c316996a23
commit
e6dbe5b7f8
1 changed files with 2 additions and 2 deletions
|
@ -222,10 +222,10 @@ delete from media where fname=?"
|
|||
Ok(map?)
|
||||
}
|
||||
|
||||
/// Error if any checksums are missing or broken.
|
||||
/// Returns all filenames and checksums, where the checksum is not null.
|
||||
pub(super) fn all_checksums(&mut self) -> Result<HashMap<String, [u8; 20]>> {
|
||||
self.db
|
||||
.prepare("SELECT fname, csum FROM media")?
|
||||
.prepare("SELECT fname, csum FROM media WHERE csum IS NOT NULL")?
|
||||
.query_and_then([], row_to_name_and_checksum)?
|
||||
.collect()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue