From bf37c8ddcc4d372ee70af703c0c5e97ede741630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 4 Jan 2021 22:48:25 +0100 Subject: no hardcoded path --- mumd/src/audio.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mumd/src') diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 569cdc5..57bd9f0 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -385,9 +385,7 @@ impl Audio { // moo fn get_sfx(file: &str) -> Cow<'static, [u8]> { let mut buf: Vec = Vec::new(); - if let Ok(mut file) = File::open(file) - .or_else(|_| File::open(format!("/home/gustav/dev/mum/mumd/src/resources/{}", file))) - { + if let Ok(mut file) = File::open(file) { file.read_to_end(&mut buf).unwrap(); Cow::from(buf) } else { -- cgit v1.2.1