From 47d8e163de229d927f62f839613c3b9e51d4cda5 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 30 Dec 2022 11:06:45 -0800 Subject: [PATCH] patch for windows compatibility: can only open tempfile once --- jc/parsers/pbPlist/pbPlist.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jc/parsers/pbPlist/pbPlist.py b/jc/parsers/pbPlist/pbPlist.py index 0239631f..65293465 100644 --- a/jc/parsers/pbPlist/pbPlist.py +++ b/jc/parsers/pbPlist/pbPlist.py @@ -36,11 +36,13 @@ class PBPlist(object): def __init__(self, file_path): self.root = None - if self.__checkFile(file_path) is True: - parser = PBParser(self.file_path) - self.root = parser.read() - self.string_encoding = parser.string_encoding - self.file_type = parser.file_type + # don't use __checkFile since we can only open the file once in Windows + # if self.__checkFile(file_path) is True: + self.file_path = file_path + parser = PBParser(self.file_path) + self.root = parser.read() + self.string_encoding = parser.string_encoding + self.file_type = parser.file_type def write(self, file_path=None): if file_path is None: