From 61cdef588afbebce81ffb4c203064e9c44860273 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 18 Aug 2021 10:48:24 +0200 Subject: [PATCH] need to catch the statement in line 1347 --- api/src/Link.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/api/src/Link.php b/api/src/Link.php index b13d81a69e..46c310e169 100644 --- a/api/src/Link.php +++ b/api/src/Link.php @@ -1344,15 +1344,16 @@ class Link extends Link\Storage Storage\History::static_add($link['app2'],$link['id2'],$GLOBALS['egw_info']['user']['account_id'],'~file~','', Vfs::basename($url)); } } - if (($Ok = !file_exists($url) || Vfs::remove($url,true)) && ((int)$app > 0 || $fname)) - { - // try removing the dir, in case it's empty - try { + try { + if (($Ok = !file_exists($url) || Vfs::remove($url,true)) && ((int)$app > 0 || $fname)) + { + // try removing the dir, in case it's empty if (($dir = Vfs::dirname($url))) @Vfs::rmdir($dir); } - catch (\Exception $e) { - // ignore SQL error caused by only virtual directories with non-integer (hash) fs_id - } + } + catch (\Exception $e) { + // ignore SQL error caused by only virtual directories with non-integer (hash) fs_id + $Ok = false; } if (!is_null($current_is_root)) {