fix: Fixes #168. Changed PutObject existing object error from custom internal error to ErrExistingObjectIsDirectory

This commit is contained in:
jonaustin09
2023-07-31 18:17:29 +04:00
parent 366ed21ede
commit 70818de594

View File

@@ -946,7 +946,7 @@ func (p *Posix) PutObject(ctx context.Context, po *s3.PutObjectInput) (string, e
err = f.link()
if err != nil {
return "", fmt.Errorf("link object in namespace: %w", err)
return "", s3err.GetAPIError(s3err.ErrExistingObjectIsDirectory)
}
for k, v := range po.Metadata {