mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Support for "directory" objects (#10499)
This commit is contained in:
@@ -22,12 +22,18 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Converts underlying storage error. Convenience function written to
|
||||
// handle all cases where we have known types of errors returned by
|
||||
// underlying storage layer.
|
||||
func toObjectErr(err error, params ...string) error {
|
||||
if len(params) > 1 {
|
||||
if HasSuffix(params[1], globalDirSuffix) {
|
||||
params[1] = strings.TrimSuffix(params[1], globalDirSuffix) + slashSeparator
|
||||
}
|
||||
}
|
||||
switch err {
|
||||
case errVolumeNotFound:
|
||||
if len(params) >= 1 {
|
||||
|
||||
Reference in New Issue
Block a user