diff --git a/mail-worker/src/utils/file-utils.js b/mail-worker/src/utils/file-utils.js index e92c623..413173c 100644 --- a/mail-worker/src/utils/file-utils.js +++ b/mail-worker/src/utils/file-utils.js @@ -1,7 +1,11 @@ const fileUtils = { getExtFileName(filename) { - const index = filename.lastIndexOf('.'); - return index !== -1 ? filename.slice(index) : ''; + try { + const index = filename.lastIndexOf('.'); + return index !== -1 ? filename.slice(index) : ''; + } catch (e) { + return '' + } }, async getBuffHash(buff) {