feat: add root prefix before operate

This commit is contained in:
Noah Hsu
2022-06-10 20:20:45 +08:00
parent 354dee67dc
commit cd7e9974df
9 changed files with 49 additions and 11 deletions

View File

@ -37,7 +37,7 @@ func (d *Driver) GetAddition() driver.Additional {
return d.Addition
}
func (d *Driver) File(ctx context.Context, path string) (driver.FileInfo, error) {
func (d *Driver) Get(ctx context.Context, path string) (driver.FileInfo, error) {
fullPath := filepath.Join(d.RootFolder, path)
if !utils.Exists(fullPath) {
return nil, errors.WithStack(driver.ErrorObjectNotFound)