From 3693e55f5c2673adbfd8698e22cba06b9fa15995 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Mon, 27 Oct 2014 11:37:22 +0100 Subject: [PATCH] Change filename encoding to only apply to local variable. --- openlp/plugins/presentations/lib/pptviewcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index 4aea501b4..8bde0b213 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -135,11 +135,11 @@ class PptviewDocument(PresentationDocument): self.file_path = os.path.normpath(self.file_path) preview_path = os.path.join(temp_folder, 'slide') # Ensure that the paths are null terminated - self.file_path = self.file_path.encode('utf-16-le') + b'\0' + byte_file_path = self.file_path.encode('utf-16-le') + b'\0' preview_path = preview_path.encode('utf-16-le') + b'\0' if not os.path.isdir(temp_folder): os.makedirs(temp_folder) - self.ppt_id = self.controller.process.OpenPPT(self.file_path, None, rect, preview_path) + self.ppt_id = self.controller.process.OpenPPT(byte_file_path, None, rect, preview_path) if self.ppt_id >= 0: self.create_thumbnails() self.stop_presentation()