Added code to fix (normalize) the custom data path

This commit is contained in:
ElderP 2012-09-17 18:20:38 -04:00
parent 68611de2d2
commit 86465f349d
2 changed files with 2 additions and 1 deletions

View File

@ -674,6 +674,7 @@ class AdvancedTab(SettingsTab):
options = QtGui.QFileDialog.ShowDirsOnly)) options = QtGui.QFileDialog.ShowDirsOnly))
# Set the new data path. # Set the new data path.
if new_data_path: if new_data_path:
new_data_path = os.path.normpath(new_data_path)
if self.currentDataPath.lower() == new_data_path.lower(): if self.currentDataPath.lower() == new_data_path.lower():
self.onDataDirectoryCancelButtonClicked() self.onDataDirectoryCancelButtonClicked()
return return

View File

@ -136,7 +136,7 @@ class AppLocation(object):
else: else:
path = AppLocation.get_directory(AppLocation.DataDir) path = AppLocation.get_directory(AppLocation.DataDir)
check_directory_exists(path) check_directory_exists(path)
return path return os.path.normpath(path)
@staticmethod @staticmethod
def get_section_data_path(section): def get_section_data_path(section):