diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-28 16:10:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-28 16:10:54 -0700 |
commit | b405ba1b1337b03be2804354b9ef26aac9d98728 (patch) | |
tree | 0a76f215344b1e357f74555307d9ed17eba23481 /src | |
parent | b86319f81859110e100666dac71bddf107de13e1 (diff) |
fix handling of generating path with a mountpoint ending with '/'
Diffstat (limited to 'src')
-rw-r--r-- | src/library_fs.js | 4 |
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; |