From: Rafal Walczyna Date: Tue, 29 Oct 2019 12:58:14 +0000 (+0100) Subject: [filesystem] Fix getAllStorages X-Git-Tag: submit/tizen_5.5/20191105.125113^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee8e1317f32532e7f8e4040f8c112824c26125b0;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [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 --- diff --git a/src/filesystem/js/common.js b/src/filesystem/js/common.js index 020c5038..ff73801e 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])); + } } }