From 68d238d34db7c162214ae5598ad2164fc8ec3671 Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 17 Jun 2022 19:01:17 +0800 Subject: [PATCH] feat: add slash to end of dir href --- assets/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/index.js b/assets/index.js index ec8d49a..b96f7f8 100644 --- a/assets/index.js +++ b/assets/index.js @@ -1,7 +1,6 @@ /** * @typedef {object} PathItem * @property {"Dir"|"SymlinkDir"|"File"|"SymlinkFile"} path_type - * @property {boolean} is_symlink * @property {string} name * @property {number} mtime * @property {number} size @@ -153,10 +152,11 @@ function addBreadcrumb(value) { * @param {number} index */ function addPath(file, index) { - const url = getUrl(file.name) + let url = getUrl(file.name) let actionDelete = ""; let actionDownload = ""; if (file.path_type.endsWith("Dir")) { + url += "/"; actionDownload = `