make sure tmpdir exists prior running a restoration (fix #315)

This commit is contained in:
ziirish 2020-03-29 23:13:37 +02:00
parent 3bfc6c653d
commit 70d9a25efe
No known key found for this signature in database
GPG key ID: 72DB229A64B54E46

View file

@ -901,6 +901,8 @@ class Burp(BUIbackend):
flist = json.loads(files)
if password:
tmphandler, tmpfile = tempfile.mkstemp()
if not os.path.exists(self.tmpdir):
os.makedirs(self.tmpdir)
tmpdir = tempfile.mkdtemp(dir=self.tmpdir)
if 'restore' not in flist:
return None, 'Wrong call'