From 5fb5652f3dbb060490656bbd00ae10f6c36d9695 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 17 May 2019 14:00:52 +0300 Subject: [PATCH] refactor(cloudfunc) getSize: regexp --- common/cloudfunc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cloudfunc.js b/common/cloudfunc.js index 44020303..d30460f5 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -244,7 +244,7 @@ function getSize(file) { type, } = file; - if (type === 'directory') + if (/^directory$/.test(type)) return '<dir>'; if (/link/.test(type))