Fixed bug #1022184: Presentation module crashes when importing powerpoint files - Windows XP is unable to handle the path being returned by QFileDialog.

bzr-revno: 2065
Fixes: https://launchpad.net/bugs/1022184
This commit is contained in:
Stevan Pettit 2012-09-19 19:41:06 +02:00 committed by Raoul Snyman
commit f6f3717499
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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):