From 76f9fc50f669ccad94c78485f670519424b27d27 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Fri, 21 Feb 2020 08:05:41 +0000 Subject: [PATCH] Handled missing resource path for resized images no issue - --- core/server/adapters/storage/LocalFileStorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/adapters/storage/LocalFileStorage.js b/core/server/adapters/storage/LocalFileStorage.js index 435bc8bda3..216dd5613e 100644 --- a/core/server/adapters/storage/LocalFileStorage.js +++ b/core/server/adapters/storage/LocalFileStorage.js @@ -164,7 +164,7 @@ class LocalFileStore extends StorageBase { return new Promise((resolve, reject) => { fs.readFile(targetPath, (err, bytes) => { if (err) { - if (err.code === 'ENOENT') { + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { return reject(new common.errors.NotFoundError({ err: err, message: common.i18n.t('errors.errors.imageNotFoundWithRef', {img: options.path})