From ccd04c7c8f878412db236b9d4968612bb02660b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wojdy=C5=82a?= Date: Sun, 10 Nov 2013 19:43:12 +0100 Subject: [PATCH] wni: properly get user profiles directory --- core/storage/wni.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/storage/wni.py b/core/storage/wni.py index eaf596de..b150fc20 100644 --- a/core/storage/wni.py +++ b/core/storage/wni.py @@ -44,9 +44,10 @@ class QubesWniVmStorage(QubesVmStorage): def __init__(self, *args, **kwargs): super(QubesWniVmStorage, self).__init__(*args, **kwargs) # Use the user profile as "private.img" - self.private_img = os.path.join("c:\\Users", self._get_username()) - - self.home_root = 'c:\\Users' + self.home_root = win32profile.GetProfilesDirectory() + # FIXME: the assignment below may not always be correct, + # but GetUserProfileDirectory needs a user token... + self.private_img = os.path.join(self.home_root, self._get_username()) # Pass paths for WNI libvirt driver os.putenv("WNI_DRIVER_QUBESDB_PATH", system_path['qubesdb_daemon_path'])