summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjakka <jakka@jakka.su>2025-07-05 20:56:08 +0300
committerjakka <jakka@jakka.su>2025-07-05 20:56:08 +0300
commitcd97819719732cd68bf205324ddf4db2afee3060 (patch)
treeba0570d70946f1673cd423339f2b66a9dbb1f657 /src
parentebc9deeed7405fe398092741d30b9a96f76f2885 (diff)
added explicit check for file actually existing when reencoding
Diffstat (limited to 'src')
-rw-r--r--src/files.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/files.rs b/src/files.rs
index c5583ee..2b924d8 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -161,6 +161,12 @@ pub fn reencode_files(
return;
}
};
+
+ if !file.exists() {
+ let _ = conn.remove_file(file);
+ return;
+ }
+
if let Err(error) = handle_encode(file) {
eprintln!("{}", FileError::new(file, error));
} else {