mirror of
https://gitee.com/openharmony/third_party_vulkan-headers
synced 2024-11-27 09:50:48 +00:00
scripts: Fix generator on Windows with Python < 3.6
This commit is contained in:
parent
87837fcd42
commit
08cbb5458f
@ -516,10 +516,9 @@ class OutputGenerator:
|
||||
# Generator can be used without writing to a file.
|
||||
if self.genOpts.filename is not None:
|
||||
if sys.platform == 'win32':
|
||||
directory = Path(self.genOpts.directory)
|
||||
if not os.path.exists(directory):
|
||||
if not os.path.exists(self.genOpts.directory):
|
||||
os.makedirs(directory)
|
||||
self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8')
|
||||
self.outFile = io.open(self.genOpts.directory + '/' + self.genOpts.filename, 'w', encoding='utf-8')
|
||||
else:
|
||||
filename = self.genOpts.directory + '/' + self.genOpts.filename
|
||||
self.outFile = io.open(filename, 'w', encoding='utf-8')
|
||||
|
Loading…
Reference in New Issue
Block a user