From 8b3e645578601eb3ad1d774748a0498578e7c937 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 30 Jan 2019 14:02:45 +0100 Subject: [PATCH] [microdecision] Archive folder might not exist --- .../data_migrations/0008_ssh_conf_managed_by_yunohost_step2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0008_ssh_conf_managed_by_yunohost_step2.py b/src/yunohost/data_migrations/0008_ssh_conf_managed_by_yunohost_step2.py index 0abb18a26..f53074a89 100644 --- a/src/yunohost/data_migrations/0008_ssh_conf_managed_by_yunohost_step2.py +++ b/src/yunohost/data_migrations/0008_ssh_conf_managed_by_yunohost_step2.py @@ -39,7 +39,8 @@ class MyMigration(Migration): # Update local archives folder permissions, so that # admin can scp archives out of the server - chown(ARCHIVES_PATH, uid="admin", gid="root") + if os.path.isdir(ARCHIVES_PATH): + chown(ARCHIVES_PATH, uid="admin", gid="root") def backward(self):