diff --git a/picard/config.py b/picard/config.py index 4116e5411..54d068ba0 100644 --- a/picard/config.py +++ b/picard/config.py @@ -18,6 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import re +import sys from operator import itemgetter from PyQt4 import QtCore from picard import (PICARD_APP_NAME, PICARD_ORG_NAME, PICARD_VERSION, @@ -236,3 +237,17 @@ _config = Config() setting = _config.setting persist = _config.persist + +# http://pyqt.sourceforge.net/Docs/PyQt4/qsettings.html#fileName +# QString QSettings.fileName (self) +# +# Returns the path where settings written using this QSettings object are stored. +# +# On Windows, if the format is QSettings.NativeFormat, the return value is a system registry path, not a file path. +FILE_PATH = 0 +REGISTRY_PATH = 1 +storage = _config.fileName() +if _config.format() == QtCore.QSettings.NativeFormat and sys.platform == "win32": + storage_type = REGISTRY_PATH +else: + storage_type = FILE_PATH diff --git a/picard/tagger.py b/picard/tagger.py index dbe17b376..9d4e2d113 100644 --- a/picard/tagger.py +++ b/picard/tagger.py @@ -138,6 +138,10 @@ class Tagger(QtGui.QApplication): log.debug("Starting Picard %s from %r", picard.__version__, os.path.abspath(__file__)) log.debug("Platform: %s %s %s", platform.platform(), platform.python_implementation(), platform.python_version()) + if config.storage_type == config.REGISTRY_PATH: + log.debug("Configuration registry path: %s", config.storage) + else: + log.debug("Configuration file path: %s", config.storage) # TODO remove this before the final release if sys.platform == "win32": @@ -151,6 +155,7 @@ class Tagger(QtGui.QApplication): shutil.move(olduserdir, USER_DIR) except: pass + log.debug("User directory: %s", os.path.abspath(USER_DIR)) # for compatibility with pre-1.3 plugins QtCore.QObject.tagger = self