From: HyunJin Park Date: Thu, 10 Sep 2015 09:50:20 +0000 (+0900) Subject: Revert "[Filesystem] Fixed for copying, deleting and moving files/dirs." X-Git-Tag: submit/tizen/20151026.073646^2^2~107^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0825e63d1a74670485f2b7881882d66a186782ad;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git Revert "[Filesystem] Fixed for copying, deleting and moving files/dirs." This reverts commit 904977b3c574276de2187e3302cc3cc6a08e99e6. Change-Id: I25eb704a920a132f6d8b6dee14c3f566cc8888c2 --- diff --git a/src/filesystem/js/common.js b/src/filesystem/js/common.js index 1bc8ed30..38f5a581 100755 --- a/src/filesystem/js/common.js +++ b/src/filesystem/js/common.js @@ -218,8 +218,7 @@ var commonFS_ = (function() { } function f_isSubDir(fullPathToCheck, fullPath) { - var realFullPath = toRealPath(fullPath); - return ((-1 !== fullPathToCheck.indexOf(realFullPath)) && (fullPathToCheck !== realFullPath)); + return (-1 !== fullPathToCheck.indexOf(toRealPath(fullPath))); }; function f_isCorrectRelativePath(relativePath) { diff --git a/src/filesystem/js/file.js b/src/filesystem/js/file.js index dc68afbc..8f3e7126 100755 --- a/src/filesystem/js/file.js +++ b/src/filesystem/js/file.js @@ -726,16 +726,6 @@ File.prototype.deleteDirectory = function(directoryPath, recursive, onsuccess, o } var _myPath = commonFS_.toRealPath(args.directoryPath); - - if (_myPath !== undefined && !commonFS_.f_isSubDir(_myPath, this.fullPath)) { - var m1 = 'Deleted directory should be under the current directory: ' + this.fullPath; - setTimeout(function() { - native_.callIfPossible(args.onerror, - new WebAPIException(WebAPIException.INVALID_VALUES_ERR, m1)); - }, 0); - return; - } - var _result = native_.callSync('File_statSync', {location: _myPath}); if (native_.isFailure(_result)) { setTimeout(function() {