diff --git a/gramps2/src/docgen/OpenDrawDoc.py b/gramps2/src/docgen/OpenDrawDoc.py index bf9cdca1e..d37982af3 100644 --- a/gramps2/src/docgen/OpenDrawDoc.py +++ b/gramps2/src/docgen/OpenDrawDoc.py @@ -21,6 +21,8 @@ import os import tempfile import string +import zipfile + import Plugins from intl import gettext as _ @@ -53,14 +55,9 @@ class OpenDrawDoc(DrawDoc): self.filename = filename tempfile.tempdir = "/tmp" - self.tempdir = tempfile.mktemp() - os.mkdir(self.tempdir,0700) - os.mkdir(self.tempdir + os.sep + "Pictures") - os.mkdir(self.tempdir + os.sep + "META-INF") + self.content_xml = tempfile.mktemp() + self.f = open(self.content_xml,"wb") - fname = self.tempdir + os.sep + "content.xml" - self.f = open(fname,"wb") - self.f.write('\n') self.f.write('\n') self.f.write('\n') self.f.write('') @@ -361,9 +358,9 @@ class OpenDrawDoc(DrawDoc): self.f.close() def _write_meta_file(self): - file = self.tempdir + os.sep + "meta.xml" name = self.name - self.f = open(file,"wb") + self.meta_xml = tempfile.mktemp() + self.f = open(self.meta_xml,"wb") self.f.write('\n') self.f.write('