From: Pawel Andruszkiewicz Date: Mon, 21 Dec 2015 14:12:04 +0000 (+0100) Subject: [File] Make sure that File.fullPath always starts with '/'. X-Git-Tag: submit/tizen/20151222.122322^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ea378088635d763c98b71487e542320f80e5188;p=platform%2Fcore%2Fapi%2Fcordova-plugins.git [File] Make sure that File.fullPath always starts with '/'. [Verification] 140 specs, 0 failures, 1 pending spec. All manual tests pass. Change-Id: I0bc3754d5a5994977100b7796140df5fd8315576 Signed-off-by: Pawel Andruszkiewicz --- diff --git a/src/file/js/rootsUtils.js b/src/file/js/rootsUtils.js index ef273b1..e673da5 100644 --- a/src/file/js/rootsUtils.js +++ b/src/file/js/rootsUtils.js @@ -34,6 +34,9 @@ var rootsUtils = (function() { if (!tmp) { tmp = '/'; } + if ('/' !== tmp[0]) { + tmp = '/' + tmp; + } return tmp; }