Commit 86f4307e authored by Efthymia Bika's avatar Efthymia Bika Committed by Giorgos Korfiatis

Fix mkdirp.sync call

parent 6a90690b
......@@ -162,9 +162,11 @@ function run_duplicity(restore, force) {
directory = path.join($("#res-directory").html(), file_to_restore);
fs.stat(directory, function (err, stats) {
if(err) {
mkdirp.sync(directory, function(err) {
toggle_error(err, err);
});
try {
mkdirp.sync(directory);
} catch(e) {
toggle_error(e, e);
}
}
});
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment