mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-08 05:00:02 +03:00
Only try to remove files if there are some to remove
This commit is contained in:
parent
7996d9a525
commit
ee468e723e
@ -167,10 +167,10 @@ impl Db {
|
||||
to_remove.push(db_path);
|
||||
}
|
||||
}
|
||||
log::info!("Num non-existant tracks: {}", to_remove.len());
|
||||
if !dry_run {
|
||||
let num_to_remove = to_remove.len();
|
||||
log::info!("Num non-existant tracks: {}", num_to_remove);
|
||||
if !dry_run && num_to_remove>0 {
|
||||
let count_before = self.get_track_count();
|
||||
let num_to_remove = to_remove.len();
|
||||
for t in to_remove {
|
||||
log::debug!("Remove '{}'", t);
|
||||
match self.conn.execute("DELETE FROM Tracks WHERE File = ?;", params![t]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user