mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-08 05:00:02 +03:00
Fix removing old tracks when run under Windows.
This commit is contained in:
parent
ee468e723e
commit
05532ec6cd
@ -5,6 +5,7 @@
|
||||
3. Update ignore syntax to allow adding SQL WHERE clauses.
|
||||
4. Use newer version of tag reader library.
|
||||
5. If fail to remove old tracks from DB, then output more info.
|
||||
6. Fix removing old tracks when run under Windows.
|
||||
|
||||
0.0.1
|
||||
-----
|
||||
|
@ -158,13 +158,14 @@ impl Db {
|
||||
let mut to_remove:Vec<String> = Vec::new();
|
||||
for tr in track_iter {
|
||||
let mut db_path:String = tr.unwrap().0;
|
||||
let orig_path = db_path.clone();
|
||||
if cfg!(windows) {
|
||||
db_path = db_path.replace("/", "\\");
|
||||
}
|
||||
let path = mpath.join(PathBuf::from(db_path.clone()));
|
||||
|
||||
if !path.exists() {
|
||||
to_remove.push(db_path);
|
||||
to_remove.push(orig_path);
|
||||
}
|
||||
}
|
||||
let num_to_remove = to_remove.len();
|
||||
|
Loading…
x
Reference in New Issue
Block a user