From 5e27ba5c8c1be603c6ae7fec8de48e3532dea1f7 Mon Sep 17 00:00:00 2001
From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com>
Date: Mon, 19 Oct 2020 13:11:26 +0000
Subject: [PATCH 1/4] fix: file upload missing path slash

---
 frontend/src/components/files/Listing.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/frontend/src/components/files/Listing.vue b/frontend/src/components/files/Listing.vue
index 96e93670..60a50c80 100644
--- a/frontend/src/components/files/Listing.vue
+++ b/frontend/src/components/files/Listing.vue
@@ -368,7 +368,7 @@ export default {
       }
 
       let files = await upload.scanFiles(dt)
-      let path = this.$route.path + base
+      let path = this.$route.path.endsWith('/') ? this.$route.path + base : this.$route.path + '/' + base
       let items = this.req.items
 
       if (base !== '') {
@@ -409,7 +409,7 @@ export default {
         }
       }
 
-      let path = this.$route.path
+      let path = this.$route.path.endsWith('/') ? this.$route.path : this.$route.path + '/'
       let conflict = upload.checkConflict(files, this.req.items)
 
       if (conflict) {

From 2bd163d92a856d65c8d4615e37898470c1edf2f4 Mon Sep 17 00:00:00 2001
From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com>
Date: Mon, 19 Oct 2020 13:14:36 +0000
Subject: [PATCH 2/4] fix: search missing path slash

---
 frontend/src/api/search.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/frontend/src/api/search.js b/frontend/src/api/search.js
index 9dfaf8ee..ecbc9b04 100644
--- a/frontend/src/api/search.js
+++ b/frontend/src/api/search.js
@@ -16,6 +16,11 @@ export default async function search (base, query) {
 
     data = data.map((item) => {
       item.url = `/files${base}` + url.encodePath(item.path)
+
+      if (item.dir) {
+        item.url += '/'
+      }
+
       return item
     })
 

From 05bff54b71543fd232f1089c40504d0cbfd106be Mon Sep 17 00:00:00 2001
From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com>
Date: Mon, 19 Oct 2020 13:25:09 +0000
Subject: [PATCH 3/4] fix: preview case sensitive file extension

---
 frontend/src/components/files/Preview.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frontend/src/components/files/Preview.vue b/frontend/src/components/files/Preview.vue
index 0ae10e32..71d50632 100644
--- a/frontend/src/components/files/Preview.vue
+++ b/frontend/src/components/files/Preview.vue
@@ -52,7 +52,7 @@
           but don't worry, you can <a :href="download">download it</a>
           and watch it with your favorite video player!
         </video>
-        <object v-else-if="req.extension == '.pdf'" class="pdf" :data="raw"></object>
+        <object v-else-if="req.extension.toLowerCase() == '.pdf'" class="pdf" :data="raw"></object>
         <a v-else-if="req.type == 'blob'" :href="download">
           <h2 class="message">{{ $t('buttons.download') }} <i class="material-icons">file_download</i></h2>
         </a>

From f2c4e78381610879eda5316d38a999c89df6c14a Mon Sep 17 00:00:00 2001
From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com>
Date: Mon, 19 Oct 2020 13:41:40 +0000
Subject: [PATCH 4/4] fix: allow start from Windows explorer

---
 cmd/root.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmd/root.go b/cmd/root.go
index 8fe0393a..86a7e0bf 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -35,6 +35,7 @@ var (
 
 func init() {
 	cobra.OnInitialize(initConfig)
+	cobra.MousetrapHelpText = ""
 
 	rootCmd.SetVersionTemplate("File Browser version {{printf \"%s\" .Version}}\n")