openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #17191
[Merge] lp:~elderp/openlp/bug-1022184 into lp:openlp
Stevan Pettit has proposed merging lp:~elderp/openlp/bug-1022184 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1022184 in OpenLP: "Presentation module crashes when importing powerpoint files"
https://bugs.launchpad.net/openlp/+bug/1022184
For more details, see:
https://code.launchpad.net/~elderp/openlp/bug-1022184/+merge/124834
Added code to correct problem on XP with QtGui.QFileDialog.getExistingDirectory(..... returning [drive]:/[directory] instead of [drive]:\[directory].
Normally this has not been a problem in OpenLP until a data directory was selected that contained a "space" and this path was passed to the powerpoint presentation dll
I added os.path.normalize(path) in get_data_path() to take care of any existing incorrect registry entries.
In advancedtab, the user selected data path is normalized after it is selected.
I tried using:
new_data_path = os.path.normpath(unicode(
QtGui.QFileDialog.getExistingDirectory....
but this returns a "." if the dialog is canceled.
--
https://code.launchpad.net/~elderp/openlp/bug-1022184/+merge/124834
Your team OpenLP Core is requested to review the proposed merge of lp:~elderp/openlp/bug-1022184 into lp:openlp.
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2012-09-16 15:33:05 +0000
+++ openlp/core/ui/advancedtab.py 2012-09-18 01:40:24 +0000
@@ -674,6 +674,7 @@
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
=== modified file 'openlp/core/utils/__init__.py'
--- openlp/core/utils/__init__.py 2012-09-16 15:33:05 +0000
+++ openlp/core/utils/__init__.py 2012-09-18 01:40:24 +0000
@@ -136,7 +136,7 @@
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):
Follow ups