aboutsummaryrefslogtreecommitdiffstats
path: root/drive/export.go
diff options
context:
space:
mode:
Diffstat (limited to 'drive/export.go')
-rw-r--r--drive/export.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/drive/export.go b/drive/export.go
index 3fdd45a..a09594e 100644
--- a/drive/export.go
+++ b/drive/export.go
@@ -5,6 +5,7 @@ import (
"io"
"mime"
"os"
+ "strings"
)
var DefaultExportMime = map[string]string{
@@ -102,6 +103,8 @@ func getExportMime(userMime, fileMime string) (string, error) {
}
func getExportFilename(name, mimeType string) string {
+ name = strings.ReplaceAll(name, "/", "_")
+
extensions, err := mime.ExtensionsByType(mimeType)
if err != nil || len(extensions) == 0 {
return name