From ee73af987ddc81dfd045a0d5ae44f8e0b37e6618 Mon Sep 17 00:00:00 2001 From: arafato Date: Mon, 15 Jan 2018 15:48:17 +0100 Subject: [PATCH] fixes #145 --- lib/core/blob/StorageManager.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/blob/StorageManager.js b/lib/core/blob/StorageManager.js index af8d423..0bdc35c 100644 --- a/lib/core/blob/StorageManager.js +++ b/lib/core/blob/StorageManager.js @@ -159,9 +159,11 @@ class StorageManager { listBlobs(request, query) { const condition = []; - condition.push({ - 'name': { '$contains': query.prefix } - }); + if (query.prefix !== '') { + condition.push({ + 'name': { '$regex': `^${query.prefix}` } + }); + } condition.push({ 'parentId': { '$eq': undefined } // blocks should never be part of the listing });