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

parent 3bfc6c65
Pipeline #1758 passed with stages
in 14 minutes and 15 seconds
......@@ -901,6 +901,8 @@ class Burp(BUIbackend):
flist = json.loads(files)
if password:
tmphandler, tmpfile = tempfile.mkstemp()
if not os.path.exists(self.tmpdir):
tmpdir = tempfile.mkdtemp(dir=self.tmpdir)
if 'restore' not in flist:
return None, 'Wrong call'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment