From fa7361d20f38db919e9344eed8e3944a092b75ca Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Mon, 26 Apr 2021 21:59:24 +0100 Subject: [PATCH] change name of sounds dir function --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 33f0b17..83c17ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,7 @@ fn error_popup(message: &str) { popup.show_all(); } -fn get_data_dir() -> PathBuf { +fn get_sounds_dir() -> PathBuf { let mut data_dir = dirs::data_dir().expect("Couldn't find user data directory"); data_dir.push("ruin"); @@ -123,7 +123,7 @@ fn build_ui(application: >k::Application) { button_manage_sounds.connect_clicked(|_| { let mut file_manager = Command::new(file_manager()); - file_manager.arg(get_data_dir()); + file_manager.arg(get_sounds_dir()); file_manager.output().unwrap(); }); @@ -147,7 +147,7 @@ fn build_ui(application: >k::Application) { let device = rodio::default_output_device().unwrap(); - let mut paths = std::fs::read_dir(get_data_dir()) + let mut paths = std::fs::read_dir(get_sounds_dir()) .expect("Couldn't read lull sounds directory") .map(|res| res.map(|e| e.path())) .collect::, std::io::Error>>()