aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--registry/generator.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/registry/generator.py b/registry/generator.py
index d6a1afe..58168cd 100644
--- a/registry/generator.py
+++ b/registry/generator.py
@@ -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')