From 3fdb3cd3d53eb931cdf2ef15c168e27d93aea698 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 15 Nov 2023 15:51:10 -0700 Subject: [PATCH] Avoid error if unlink parent is not a directory --- api/src/Vfs/Sqlfs/StreamWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Vfs/Sqlfs/StreamWrapper.php b/api/src/Vfs/Sqlfs/StreamWrapper.php index 418530573e..d6be3a4ebb 100644 --- a/api/src/Vfs/Sqlfs/StreamWrapper.php +++ b/api/src/Vfs/Sqlfs/StreamWrapper.php @@ -607,7 +607,7 @@ class StreamWrapper extends Api\Db\Pdo implements Vfs\StreamWrapperIface $stmt = self::$pdo->prepare('DELETE FROM '.self::PROPS_TABLE.' WHERE fs_id=?'); $stmt->execute(array($stat['ino'])); - if ($stat['mime'] !== self::SYMLINK_MIME_TYPE) + if($stat['mime'] !== self::SYMLINK_MIME_TYPE && is_array($parent_stat)) { $this->adjustDirSize($parent_stat['ino'], -$stat['size']); }