forked from openlp/openlp
Refactored to use os.path.normpath and os.path.join
This commit is contained in:
parent
1cf4b8f4ce
commit
a7a51a2ff6
@ -126,10 +126,10 @@ class PptviewDocument(PresentationDocument):
|
|||||||
renderer = self.controller.plugin.renderer
|
renderer = self.controller.plugin.renderer
|
||||||
rect = renderer.screens.current[u'size']
|
rect = renderer.screens.current[u'size']
|
||||||
rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom())
|
rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom())
|
||||||
filepath = self.filepath.replace(u'/', u'\\')
|
filepath = os.path.normpath(self.filepath)
|
||||||
|
preview_path = os.path.join(self.get_temp_folder(), u'slide')
|
||||||
if not os.path.isdir(self.get_temp_folder()):
|
if not os.path.isdir(self.get_temp_folder()):
|
||||||
os.makedirs(self.get_temp_folder())
|
os.makedirs(self.get_temp_folder())
|
||||||
preview_path = self.get_temp_folder() + u'\\slide'
|
|
||||||
file_system_encoding = sys.getfilesystemencoding()
|
file_system_encoding = sys.getfilesystemencoding()
|
||||||
self.pptid = self.controller.process.OpenPPT(filepath.encode(file_system_encoding), None, rect,
|
self.pptid = self.controller.process.OpenPPT(filepath.encode(file_system_encoding), None, rect,
|
||||||
preview_path.encode(file_system_encoding))
|
preview_path.encode(file_system_encoding))
|
||||||
|
Loading…
Reference in New Issue
Block a user