avoid parsing config file as a sound
This commit is contained in:
parent
fa7361d20f
commit
7db845e03e
|
@ -156,7 +156,14 @@ fn build_ui(application: >k::Application) {
|
||||||
paths.sort();
|
paths.sort();
|
||||||
|
|
||||||
for path in paths {
|
for path in paths {
|
||||||
let name: &str = path.file_stem().unwrap().to_str().unwrap();
|
let name = path.file_stem().unwrap().to_str().unwrap();
|
||||||
|
let extension = path.extension().unwrap().to_str().unwrap();
|
||||||
|
|
||||||
|
// on Windows the data dir and config dir are the same,
|
||||||
|
// so avoid parsing the config file as an audio file
|
||||||
|
if extension == "toml" {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let file = File::open(&path)
|
let file = File::open(&path)
|
||||||
.expect("Couldn't open audio file");
|
.expect("Couldn't open audio file");
|
||||||
|
|
Loading…
Reference in New Issue