From 6b84af93d1b5bf77981127711448952d61125874 Mon Sep 17 00:00:00 2001 From: doronz88 Date: Mon, 4 Nov 2024 12:53:10 +0200 Subject: [PATCH] common: make home folder creation use the right owner --- pymobiledevice3/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pymobiledevice3/common.py b/pymobiledevice3/common.py index c34da970..3f880226 100644 --- a/pymobiledevice3/common.py +++ b/pymobiledevice3/common.py @@ -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