fix(local): filename with whitespace issue (#3928)

* fix(local): filename whitespace problem

* fix(deps): remove deprecated package io/ioutil

---------

Co-authored-by: XZB <i@1248.ink>
This commit is contained in:
XZB-1248
2023-03-23 15:18:37 +08:00
committed by GitHub
parent c6af22b97e
commit 0eab31bdf5
4 changed files with 24 additions and 9 deletions

View File

@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
stdpath "path"
@ -68,7 +67,7 @@ func (d *Local) GetAddition() driver.Additional {
func (d *Local) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) {
fullPath := dir.GetPath()
rawFiles, err := ioutil.ReadDir(fullPath)
rawFiles, err := readDir(fullPath)
if err != nil {
return nil, err
}