chore(fs): rename some variable and param

This commit is contained in:
Noah Hsu
2022-06-22 15:03:27 +08:00
parent f6242d46b1
commit 72208e052a
3 changed files with 11 additions and 11 deletions

View File

@ -187,15 +187,15 @@ func Remove(ctx context.Context, account driver.Driver, path string) error {
return account.Remove(ctx, obj)
}
func Put(ctx context.Context, account driver.Driver, parentPath string, file model.FileStreamer, up driver.UpdateProgress) error {
err := MakeDir(ctx, account, parentPath)
func Put(ctx context.Context, account driver.Driver, dstDirPath string, file model.FileStreamer, up driver.UpdateProgress) error {
err := MakeDir(ctx, account, dstDirPath)
if err != nil {
return errors.WithMessagef(err, "failed to make dir [%s]", parentPath)
return errors.WithMessagef(err, "failed to make dir [%s]", dstDirPath)
}
parentDir, err := Get(ctx, account, parentPath)
parentDir, err := Get(ctx, account, dstDirPath)
// this should not happen
if err != nil {
return errors.WithMessagef(err, "failed to get dir [%s]", parentPath)
return errors.WithMessagef(err, "failed to get dir [%s]", dstDirPath)
}
// if up is nil, set a default to prevent panic
if up == nil {