]> OzVa Git service - ozva-cloud/commitdiff
feat: add slash to end of dir href
authorsigoden <sigoden@gmail.com>
Fri, 17 Jun 2022 11:01:17 +0000 (19:01 +0800)
committersigoden <sigoden@gmail.com>
Fri, 17 Jun 2022 11:01:17 +0000 (19:01 +0800)
assets/index.js

index ec8d49a0deb6ed67f65a1e1142456308eba0dc58..b96f7f85895b4cca6fbfe4b90e635b38a9ad42fd 100644 (file)
@@ -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 = `
     <div class="action-btn">
       <a href="${url}?zip" title="Download folder as a .zip file">