Skip to content

Commit

Permalink
Merge pull request #562 from initializedd/support-netsim-ini-tmpdir-o…
Browse files Browse the repository at this point in the history
…n-linux

Support netsim.ini tmpdir on linux
  • Loading branch information
barbibulle authored Sep 27, 2024
2 parents bdba5c9 + d069708 commit 034140c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bumble/transport/android_netsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def get_ini_dir() -> Optional[pathlib.Path]:
elif sys.platform == 'linux':
if xdg_runtime_dir := os.environ.get('XDG_RUNTIME_DIR', None):
return pathlib.Path(xdg_runtime_dir)
tmpdir = os.environ.get('TMPDIR', '/tmp')
if pathlib.Path(tmpdir).is_dir():
return pathlib.Path(tmpdir)
elif sys.platform == 'win32':
if local_app_data_dir := os.environ.get('LOCALAPPDATA', None):
return pathlib.Path(local_app_data_dir) / 'Temp'
Expand Down

0 comments on commit 034140c

Please sign in to comment.