From 86465f349d788f1fa7887379a146be8fed2f9184 Mon Sep 17 00:00:00 2001 From: ElderP Date: Mon, 17 Sep 2012 18:20:38 -0400 Subject: [PATCH] Added code to fix (normalize) the custom data path --- openlp/core/ui/advancedtab.py | 1 + openlp/core/utils/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index 1c2ea884c..ab8228658 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -674,6 +674,7 @@ class AdvancedTab(SettingsTab): options = QtGui.QFileDialog.ShowDirsOnly)) # Set the new data path. if new_data_path: + new_data_path = os.path.normpath(new_data_path) if self.currentDataPath.lower() == new_data_path.lower(): self.onDataDirectoryCancelButtonClicked() return diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 602c48728..41a097a15 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -136,7 +136,7 @@ class AppLocation(object): else: path = AppLocation.get_directory(AppLocation.DataDir) check_directory_exists(path) - return path + return os.path.normpath(path) @staticmethod def get_section_data_path(section):