From e909b66e227d372fd2d4c0915f4277792506edef Mon Sep 17 00:00:00 2001 From: Rafal Walczyna Date: Tue, 29 Oct 2019 13:58:14 +0100 Subject: [PATCH] [filesystem] Fix getAllStorages Fixed bug which causes to show duplicated values of internal and external storages [verification] Filesystem and Archive tct - 100% pass. Change-Id: Ic087583a906eecfa040d97cb903f4c99838c6591 Signed-off-by: Rafal Walczyna --- src/filesystem/js/common.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/filesystem/js/common.js b/src/filesystem/js/common.js index 020c503..ff73801 100644 --- a/src/filesystem/js/common.js +++ b/src/filesystem/js/common.js @@ -430,7 +430,16 @@ var commonFS_ = (function() { for (var key in cacheVirtualToReal) { if (cacheVirtualToReal.hasOwnProperty(key)) { - ret.push(cloneStorage(cacheVirtualToReal[key])); + var found = false; + for (var i = 0; i < cacheStorages.length; ++i) { + if (key === ret[i].label) { + found = true; + break; + } + } + if (found === false) { + ret.push(cloneStorage(cacheVirtualToReal[key])); + } } } -- 2.7.4