summaryrefslogtreecommitdiff
path: root/src/files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/files.rs')
-rw-r--r--src/files.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/files.rs b/src/files.rs
index 152de36..601ea7c 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -165,8 +165,12 @@ pub fn reencode_files(conn: &Database, handler: Arc<AtomicBool>) -> Result<()> {
if handler.load(Ordering::SeqCst) {
if let Err(error) = handle_encode(file) {
eprintln!("{}", FileError::new(file, error));
- } else if let Err(error) = smol::block_on(async { conn.update_file(file).await }) {
- eprintln!("{}", FileError::new(file, error));
+ } else {
+ if let Err(error) = smol::block_on(async { conn.update_file(file).await }) {
+ eprintln!("{}", FileError::new(file, error));
+ }
+ #[cfg(not(test))]
+ bar.inc(1)
}
}
});