small fix
This commit is contained in:
@@ -2,6 +2,7 @@ package filestore
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"git.company.lan/gopkg/filestore/remote"
|
||||
)
|
||||
@@ -43,6 +44,7 @@ func NewHttpFS(dir string, opts ...HttpFSOption) (*HttpFS, error) {
|
||||
|
||||
// Open
|
||||
func (f *HttpFS) Open(name string) (http.File, error) {
|
||||
name = strings.TrimPrefix(name, "/")
|
||||
if f.remoteStorage != nil {
|
||||
return f.remoteStorage.Open(name)
|
||||
}
|
||||
@@ -51,6 +53,7 @@ func (f *HttpFS) Open(name string) (http.File, error) {
|
||||
|
||||
// Remove
|
||||
func (f *HttpFS) Remove(name string) error {
|
||||
name = strings.TrimPrefix(name, "/")
|
||||
if f.remoteStorage != nil {
|
||||
return f.remoteStorage.Remove(name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user