Skip to content

Commit

Permalink
Merge pull request #1271 from doronz88/bugfix/home-folder-permissions
Browse files Browse the repository at this point in the history
common: make home folder creation use the right owner
  • Loading branch information
doronz88 authored Nov 4, 2024
2 parents 2b64538 + 6b84af9 commit ad3e91d
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 ad3e91d

Please sign in to comment.