From 469e0acc1666c962530b63c7507d80961ce6f51c Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Mon, 13 Dec 2021 16:24:40 +0100 Subject: [PATCH] Fix controllo sui permessi all'aggiornamento --- lib/functions.php | 4 +++- src/Update.php | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index d8bc82803..a81576a2a 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -130,7 +130,9 @@ function copyr($source, $destination, $ignores = []) // Filesystem Symfony $fs = new SymfonyFilesystem(); - $fs->chmod($destination, 0777, 0000, true); + try { + $fs->chmod($destination, 0777, 0000, true); + } catch (\Exception $e) {} foreach ($files as $file) { $filename = rtrim($destination, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file->getRelativePathname(); diff --git a/src/Update.php b/src/Update.php index e73cbeb23..f6bc27345 100755 --- a/src/Update.php +++ b/src/Update.php @@ -212,8 +212,11 @@ class Update // Correzione permessi per le cartelle backup e files $fs = new SymfonyFilesystem(); - $fs->chmod('backup', 0777, 0000, true); - $fs->chmod('files', 0777, 0000, true); + + try { + $fs->chmod('backup', 0777, 0000, true); + $fs->chmod('files', 0777, 0000, true); + } catch (\Exception $e) {} return true; }