Fix file naming for folder import

This commit is contained in:
Elias Projahn 2021-01-30 13:38:59 +01:00
parent 52f0df7097
commit de35eb4e90

View file

@ -172,10 +172,9 @@ impl MediumEditor {
// Copy the corresponding audio file to the music library.
let track_source = &source_tracks[track_data.track_source];
let file_name = format!("track_{:02}.flac", track_source.number);
let mut track_path = path.clone();
track_path.push(&file_name);
track_path.push(track_source.path.file_name().unwrap());
std::fs::copy(&track_source.path, &track_path)?;