fix escape

This commit is contained in:
Mukhtar Akere
2025-04-17 16:31:39 +01:00
parent 1983e27124
commit 8c78da3f69
5 changed files with 18 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/sirrobot01/decypharr/internal/config"
"github.com/sirrobot01/decypharr/internal/request"
"github.com/sirrobot01/decypharr/internal/utils"
"github.com/sirrobot01/decypharr/pkg/debrid/types"
"io"
"net/http"
@@ -23,8 +24,8 @@ type fileInfo struct {
isDir bool
}
func (fi *fileInfo) Name() string { return url.PathEscape(fi.name) }
func (fi *fileInfo) RawName() string { return fi.name }
func (fi *fileInfo) Name() string { return utils.EscapePath(fi.name) }
func (fi *fileInfo) RawName() string { return url.PathEscape(fi.name) }
func (fi *fileInfo) Size() int64 { return fi.size }
func (fi *fileInfo) Mode() os.FileMode { return fi.mode }
func (fi *fileInfo) ModTime() time.Time { return fi.modTime }