diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-01-04 22:48:25 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-01-04 22:48:25 +0100 |
| commit | bf37c8ddcc4d372ee70af703c0c5e97ede741630 (patch) | |
| tree | 8b7ca6190b503c455278e2eb6ba07512f9a09ea3 /mumd/src/audio.rs | |
| parent | 38a9a4d11821fe5b9948d4a94935e5ccb103fdf2 (diff) | |
| download | mum-bf37c8ddcc4d372ee70af703c0c5e97ede741630.tar.gz | |
no hardcoded path
Diffstat (limited to 'mumd/src/audio.rs')
| -rw-r--r-- | mumd/src/audio.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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<u8> = 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 { |
