aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-16 11:53:13 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-16 11:53:13 -0700
commit1a5990162a3f678ba76e017d81c34ba67df97c53 (patch)
tree53588017313280c74f901f9c4df9e4080c319cf8 /src/library.js
parent4de54e3bece9a51a69bd46076acaa7746c1fa996 (diff)
parentcd3320992885c2f5fdd4f10b058c6d633d26cb74 (diff)
Merge pull request #1173 from manuels/incoming
Fix bug in rename() that occures if new filename starts with the old filename
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 84071b68..d19fd531 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3482,7 +3482,8 @@ LibraryManager.library = {
} else if (oldObj.isRoot || oldObj.path == FS.currentPath) {
___setErrNo(ERRNO_CODES.EBUSY);
return -1;
- } else if (newObj.path && newObj.path.indexOf(oldObj.path) == 0) {
+ } else if (newObj.parentPath &&
+ newObj.parentPath.indexOf(oldObj.path) == 0) {
___setErrNo(ERRNO_CODES.EINVAL);
return -1;
} else if (newObj.exists && newObj.object.isFolder) {