mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
Merge pull request #19 from arabianq/fix-unsafe-unwrap-on-file-path-conversion-in-cli-6901726970689342812
🧹 Fix unsafe unwrap on file path conversion in CLI and GUI
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
Actions::Play {
|
Actions::Play {
|
||||||
file_path,
|
file_path,
|
||||||
concurrent,
|
concurrent,
|
||||||
} => Request::play(file_path.to_str().unwrap(), concurrent),
|
} => Request::play(&file_path.to_string_lossy(), concurrent),
|
||||||
Actions::ToggleLoop { id } => Request::toggle_loop(id),
|
Actions::ToggleLoop { id } => Request::toggle_loop(id),
|
||||||
},
|
},
|
||||||
Commands::Get { parameter } => match parameter {
|
Commands::Get { parameter } => match parameter {
|
||||||
|
|||||||
+1
-1
@@ -113,7 +113,7 @@ impl SoundpadGui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn play_file(&mut self, path: &PathBuf, concurrent: bool) {
|
pub fn play_file(&mut self, path: &PathBuf, concurrent: bool) {
|
||||||
make_request_async(Request::play(path.to_str().unwrap(), concurrent));
|
make_request_async(Request::play(&path.to_string_lossy(), concurrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_input(&mut self, name: String) {
|
pub fn set_input(&mut self, name: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user