From 76f107cbfe9aeb4a18dabb34f6da07e76b5452f3 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Mon, 13 Feb 2012 00:11:19 +0100 Subject: [PATCH] Fixes problems with folder recognition in the JS version. --- README.md | 1 + src/_h5ai/js/inc/Path.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ac1bdea..2f9352ea 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h * updates year in `LICENSE.TXT` * updates es translation * custom headers/footers are now optional and disabled by default +* fixes problems with folder recognition in the JS version ### v0.17 - *2011-11-28* diff --git a/src/_h5ai/js/inc/Path.js b/src/_h5ai/js/inc/Path.js index f699a06f..f250fc97 100644 --- a/src/_h5ai/js/inc/Path.js +++ b/src/_h5ai/js/inc/Path.js @@ -39,7 +39,7 @@ path.parentFolder = folder; path.label = $a.text(); - path.type = $tds.eq(0).find("img").attr("alt") === "[DIR]" ? "folder" : H5AI.core.getFileType(path.label); + path.type = H5AI.util.pathEndsWithSlash(path.label) ? "folder" : H5AI.core.getFileType(path.label); path.href = $a.attr("href"); path.time = date ? date.getTime() : 0; path.size = size;