From 8bf8534a9a68c9ca324559c1aede7a939d495a52 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 30 Nov 2016 00:02:52 -0500 Subject: [PATCH] [fix] Need to create archives_path even for custom output directory --- src/yunohost/backup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/yunohost/backup.py b/src/yunohost/backup.py index dd7c7385..7d2e9d44 100644 --- a/src/yunohost/backup.py +++ b/src/yunohost/backup.py @@ -120,8 +120,10 @@ def backup_create(name=None, description=None, output_directory=None, env_var['CAN_BIND'] = 0 else: output_directory = archives_path - if not os.path.isdir(archives_path): - os.mkdir(archives_path, 0750) + + # Create archives directory if it does not exists + if not os.path.isdir(archives_path): + os.mkdir(archives_path, 0750) def _clean_tmp_dir(retcode=0): ret = hook_callback('post_backup_create', args=[tmp_dir, retcode])