projects
/
platform
/
core
/
api
/
cordova-plugins.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7703c08
)
[File] Improved check for copy/move operation onto itself.
author
Pawel Andruszkiewicz
<p.andruszkie@samsung.com>
Fri, 13 Nov 2015 08:13:26 +0000
(09:13 +0100)
committer
Pawel Andruszkiewicz
<p.andruszkie@samsung.com>
Fri, 13 Nov 2015 08:13:26 +0000
(09:13 +0100)
[Verification] Code compiles, pass rate did not change (137/140).
Change-Id: I257fc8b8f2ec91d5afeb658c587168f368427281
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/file/js/Entry.js
patch
|
blob
|
history
diff --git
a/src/file/js/Entry.js
b/src/file/js/Entry.js
index
47a409b
..
1b56c28
100644
(file)
--- a/
src/file/js/Entry.js
+++ b/
src/file/js/Entry.js
@@
-59,7
+59,7
@@
var changeFile = function(method, successCallback, errorCallback, args) {
return;
}
- if (
rootsUtils.getFullPath(srcURL) === rootsUtils.getFullPath(destURL
)) {
+ if (
-1 !== (rootsUtils.getFullPath(destURL) + '/').indexOf(rootsUtils.getFullPath(srcURL) + '/'
)) {
fail(FileError.INVALID_MODIFICATION_ERR, 'Error - Cannot copy/move onto itself.');
return;
}