simonrepp/faircamp
24
334
Fork
You've already forked faircamp
46

Create artist directory before writing M3U #142

Merged
simonrepp merged 1 commit from :directory into main 2025年01月08日 15:15:47 +01:00
Contributor
Copy link

When running Faircamp with the label_mode and m3u options enabled, I got the following error:

thread 'main' panicked at src/main.rs:193:67:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
 0: 0x55985751aa82 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha76e39dbedb018d2
 1: 0x559857547e73 - core::fmt::write::h701b38b9ee9775ef
 2: 0x55985751618f - std::io::Write::write_fmt::h53b2c5fa4a3a3284
 3: 0x55985751a932 - std::sys::backtrace::BacktraceLock::print::h769c8a52ed7537f5
 4: 0x55985751bab4 - std::panicking::default_hook::{{closure}}::h831f61a2c70747b0
 5: 0x55985751b8f6 - std::panicking::default_hook::h7b8e28414a5b4d3b
 6: 0x55985751c0c2 - std::panicking::rust_panic_with_hook::h72b2a7caae76ecf4
 7: 0x55985751bf4a - std::panicking::begin_panic_handler::{{closure}}::h89a49b7d16bacd6b
 8: 0x55985751af49 - std::sys::backtrace::__rust_end_short_backtrace::h6d8d286deb18c72f
 9: 0x55985751bbac - rust_begin_unwind
 10: 0x559856f11590 - core::panicking::panic_fmt::h6d70a2f9bc0585ed
 11: 0x559856f119d6 - core::result::unwrap_failed::hf59a9ea083c04c64
 12: 0x55985708546f - faircamp::main::h5ddc98453eb4dd84
 13: 0x55985706a913 - std::sys::backtrace::__rust_begin_short_backtrace::hda1d16e76a3627a7
 14: 0x55985709ae29 - std::rt::lang_start::{{closure}}::h73edbe307709f800
 15: 0x55985750e08e - std::rt::lang_start_internal::hb8cd172289ce6724
 16: 0x559857086b75 - main
 17: 0x7fd3fc64ee08 - <unknown>
 18: 0x7fd3fc64eecc - __libc_start_main
 19: 0x559856f11e15 - _start
 20: 0x0 - <unknown>

This PR moves the create_dir call in front of the M3U logic, fixing the error.

When running Faircamp with the `label_mode` and `m3u` options enabled, I got the following error: ``` thread 'main' panicked at src/main.rs:193:67: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" } stack backtrace: 0: 0x55985751aa82 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha76e39dbedb018d2 1: 0x559857547e73 - core::fmt::write::h701b38b9ee9775ef 2: 0x55985751618f - std::io::Write::write_fmt::h53b2c5fa4a3a3284 3: 0x55985751a932 - std::sys::backtrace::BacktraceLock::print::h769c8a52ed7537f5 4: 0x55985751bab4 - std::panicking::default_hook::{{closure}}::h831f61a2c70747b0 5: 0x55985751b8f6 - std::panicking::default_hook::h7b8e28414a5b4d3b 6: 0x55985751c0c2 - std::panicking::rust_panic_with_hook::h72b2a7caae76ecf4 7: 0x55985751bf4a - std::panicking::begin_panic_handler::{{closure}}::h89a49b7d16bacd6b 8: 0x55985751af49 - std::sys::backtrace::__rust_end_short_backtrace::h6d8d286deb18c72f 9: 0x55985751bbac - rust_begin_unwind 10: 0x559856f11590 - core::panicking::panic_fmt::h6d70a2f9bc0585ed 11: 0x559856f119d6 - core::result::unwrap_failed::hf59a9ea083c04c64 12: 0x55985708546f - faircamp::main::h5ddc98453eb4dd84 13: 0x55985706a913 - std::sys::backtrace::__rust_begin_short_backtrace::hda1d16e76a3627a7 14: 0x55985709ae29 - std::rt::lang_start::{{closure}}::h73edbe307709f800 15: 0x55985750e08e - std::rt::lang_start_internal::hb8cd172289ce6724 16: 0x559857086b75 - main 17: 0x7fd3fc64ee08 - <unknown> 18: 0x7fd3fc64eecc - __libc_start_main 19: 0x559856f11e15 - _start 20: 0x0 - <unknown> ``` This PR moves the `create_dir` call in front of the M3U logic, fixing the error.

Great catch, thanks a lot!

I had planned to announce 1.1.0 today, but this clearly merits a patch release! Putting it on my schedule for tomorrow as I can't fit it in today anymore.

Great catch, thanks a lot! I had planned to announce 1.1.0 today, but this clearly merits a patch release! Putting it on my schedule for tomorrow as I can't fit it in today anymore.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
simonrepp/faircamp!142
Reference in a new issue
simonrepp/faircamp
No description provided.
Delete branch ":directory"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?