Skip to content

Commit

Permalink
fix: allow for Windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray authored Jun 2, 2024
1 parent ef59f44 commit 6d440dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovos_audio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ def _resolve_sound_uri(uri: str):
""" helper to resolve sound files full path"""
if uri is None:
return None
if uri.startswith("snd/"):
local_uri = f"{os.path.dirname(__file__)}/res/{uri}"
if uri.startswith("snd/") or uri.startswith("snd\\"):
local_uri = os.path.join(os.path.dirname(__file__)}, "res", uri)
if os.path.isfile(local_uri):
return local_uri
audio_file = resolve_resource_file(uri)
Expand Down

0 comments on commit 6d440dd

Please sign in to comment.