From 09c210415eb6bfb734b0e7d3f6e3c4918c06fa94 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 26 Jan 2022 12:53:08 -0700 Subject: [PATCH] Make sure we use the lowest file_id, even if that comes from a disabled file, so we're consistent with versioned files --- 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 22b64c1fdd..62f55b03a4 100644 --- a/api/src/Vfs/Sqlfs/StreamWrapper.php +++ b/api/src/Vfs/Sqlfs/StreamWrapper.php @@ -1654,7 +1654,7 @@ class StreamWrapper extends Api\Db\Pdo implements Vfs\StreamWrapperIface $query = 'SELECT MIN(B.fs_id) FROM ' . self::TABLE . ' as A JOIN ' . self::TABLE . ' AS B ON A.fs_name = B.fs_name AND A.fs_dir = B.fs_dir AND A.fs_active = ' . - self::_pdo_boolean(true) . ' AND B.fs_active = ' . self::_pdo_boolean(true) . ' + self::_pdo_boolean(true) . ' AND B.fs_active = ' . self::_pdo_boolean(false) . ' WHERE A.fs_id=? GROUP BY A.fs_id'; if (self::LOG_LEVEL > 2)