diff --git a/lib/functions.php b/lib/functions.php index a81576a2a..91885544c 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -132,7 +132,7 @@ function copyr($source, $destination, $ignores = []) try { $fs->chmod($destination, 0777, 0000, true); - } catch (\Exception $e) {} + } catch (IOException $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 f6bc27345..03c596d08 100755 --- a/src/Update.php +++ b/src/Update.php @@ -18,6 +18,7 @@ */ use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem; +use Symfony\Component\Filesystem\Exception\IOException; /** * Classe dedicata alla gestione delle procedure di aggiornamento del database del progetto. @@ -216,7 +217,7 @@ class Update try { $fs->chmod('backup', 0777, 0000, true); $fs->chmod('files', 0777, 0000, true); - } catch (\Exception $e) {} + } catch (IOException $e) {} return true; }