forge
Explore
Log in

Don't you dare go Hollow

A failed import says which file failed

Browse files at this commit

555a273c2245e92f9f29f9af77acfe833bf14a4dAhmet Kaan GümüşParent: c003414
  • fix
    • a failed import says which file failed
Show full message
🐛 fix(ui): a failed import says which file failed

Two files on argv that both fail read as "IMPORT FAILED: No such file or
directory (os error 2)" and "IMPORT FAILED: file contains a box with a larger
size than it" -- two messages, neither of them naming what they are about.
Harmless while the bar showed one message and lost the other; the moment the
queue shows both, an unnamed failure is a failure about nothing.
crates/app/src/main.rsmodified+4 -1
@@ -4373,7 +4373,10 @@ impl Player {
4373 file_name(path)4373 file_name(path)
4374 )4374 )
4375 }4375 }
4376- Some(Err(e)) => format!("IMPORT FAILED: {e}"),4376+ // Named, because two files can fail in one launch and the queue now
4377+ // shows both: "No such file or directory" twice over, with nothing
4378+ // saying which file, is two messages that answer nothing.
4379+ Some(Err(e)) => format!("IMPORT FAILED: {} — {e}", file_name(path)),
4377 None => self.open_media(path, false, subs),4380 None => self.open_media(path, false, subs),
4378 };4381 };
4379 eprintln!("{text}");4382 eprintln!("{text}");