0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Handled missing resource path for resized images

no issue

-
This commit is contained in:
Daniel Lockyer 2020-02-21 08:05:41 +00:00
parent f38d490886
commit 76f9fc50f6

View file

@ -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})