Skip to content

Commit

Permalink
AudioRecorder: fix None directory in non-flatpak env
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Mar 17, 2021
1 parent c897884 commit 1163b31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/recorders.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def get_tmp_dir(self, media_type):
extension = ".ogg"
elif media_type == "video":
extension = ".mkv"
return f"{os.getenv('XDG_CACHE_HOME')}/tmp/tmp{media_type}{extension}"
directory = os.getenv('XDG_CACHE_HOME')
if not directory:
directory = ""
return f"{directory}/tmp/tmp{media_type}{extension}"


class VideoRecorder:
Expand Down

0 comments on commit 1163b31

Please sign in to comment.