Skip to content

Commit

Permalink
fix: tmp directory is not writeable in android #549
Browse files Browse the repository at this point in the history
  • Loading branch information
vicwomg committed Jan 5, 2025
1 parent c8a8fe1 commit 9e86813
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pikaraoke/lib/file_resolver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import re
import shutil
import tempfile
import zipfile
from sys import maxsize

Expand All @@ -11,10 +12,8 @@
def get_tmp_dir():
# Determine tmp directories (for things like extracted cdg files)
pid = os.getpid() # for scoping tmp directories to this process
if get_platform() == "windows":
tmp_dir = os.path.expanduser(r"~\\AppData\\Local\\Temp\\pikaraoke\\" + str(pid) + r"\\")
else:
tmp_dir = f"/tmp/pikaraoke/{pid}"
print(tempfile.gettempdir())
tmp_dir = os.path.join(tempfile.gettempdir(), f"{pid}")
return tmp_dir


Expand Down

0 comments on commit 9e86813

Please sign in to comment.