aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormanuels <manuel.schoelling@gmx.de>2013-05-15 18:54:48 +0200
committermanuels <manuel.schoelling@gmx.de>2013-05-15 18:54:48 +0200
commitcd3320992885c2f5fdd4f10b058c6d633d26cb74 (patch)
tree7a044f6c5a526735042b4c4ce1d0cb0b004b6b90 /src
parent4e72ab4bd5cbf987e08d0ca72bef4292e5870d8e (diff)
Fix bug in rename() that occures if new filename starts with the old filename
Diffstat (limited to 'src')
-rw-r--r--src/library.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index aaef2f74..53f0a34b 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3454,8 +3454,7 @@ LibraryManager.library = {
___setErrNo(ERRNO_CODES.EBUSY);
return -1;
} else if (newObj.parentPath &&
- newObj.parentPath.indexOf(oldObj.parentPath) == 0 &&
- newObj.parentPath != oldObj.parentPath) {
+ newObj.parentPath.indexOf(oldObj.path) == 0) {
___setErrNo(ERRNO_CODES.EINVAL);
return -1;
} else if (newObj.exists && newObj.object.isFolder) {