aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-28 16:10:54 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-28 16:10:54 -0700
commitb405ba1b1337b03be2804354b9ef26aac9d98728 (patch)
tree0a76f215344b1e357f74555307d9ed17eba23481 /src
parentb86319f81859110e100666dac71bddf107de13e1 (diff)
fix handling of generating path with a mountpoint ending with '/'
Diffstat (limited to 'src')
-rw-r--r--src/library_fs.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library_fs.js b/src/library_fs.js
index 53d0d3f1..0e16343a 100644
--- a/src/library_fs.js
+++ b/src/library_fs.js
@@ -95,7 +95,9 @@ mergeInto(LibraryManager.library, {
var path;
while (true) {
if (FS.isRoot(node)) {
- return path ? node.mount.mountpoint + '/' + path : node.mount.mountpoint;
+ var mount = node.mount.mountpoint;
+ if (!path) return mount;
+ return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path;
}
path = path ? node.name + '/' + path : node.name;
node = node.parent;