Skip to content

Commit

Permalink
common: make home folder creation use write permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Nov 4, 2024
1 parent 2b64538 commit 31c5bab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymobiledevice3/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

from pymobiledevice3.osu.os_utils import get_os_utils

_HOMEFOLDER = get_os_utils().get_homedir() / '.pymobiledevice3'
_OS_UTILS = get_os_utils()
_HOMEFOLDER = _OS_UTILS.get_homedir() / '.pymobiledevice3'


def get_home_folder() -> Path:
_HOMEFOLDER.mkdir(exist_ok=True, parents=True)
_OS_UTILS.chown_to_non_sudo_if_needed(_HOMEFOLDER)
return _HOMEFOLDER

0 comments on commit 31c5bab

Please sign in to comment.