From 24ac222d95de3c87a21c41630e1a6b49789836b8 Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Tue, 10 Nov 2015 08:48:23 +0100 Subject: [PATCH] [File] getParent() on a root should return that root. [Verification] Code compiles, pass rate: 114/140. Change-Id: I9d4f2572e691bfc04ffd720cdd6866b6e20cbfde Signed-off-by: Pawel Andruszkiewicz --- src/file/js/Entry.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/file/js/Entry.js b/src/file/js/Entry.js index f9f35c5..68ebadc 100644 --- a/src/file/js/Entry.js +++ b/src/file/js/Entry.js @@ -140,7 +140,11 @@ module.exports = { }, getParent: function(successCallback, errorCallback, args) { var url = args[0]; - console.log('url ' + url); + + if (rootsUtils.isRootUri(url)) { + successCallback && successCallback(rootsUtils.findFilesystem(url)); + return; + } resolveParent(url, errorCallback, function(srcFile, parentDir){ -- 2.7.4