mirror of
https://github.com/minio/mc.git
synced 2025-11-17 22:22:33 +03:00
Make default client type as Filesystem
This commit is contained in:
@@ -43,12 +43,14 @@ func (f *fsClient) Put(md5HexString string, size int64) (io.WriteCloser, error)
|
||||
}
|
||||
objectDir, _ := filepath.Split(f.path)
|
||||
objectPath := f.path
|
||||
if objectDir != "" {
|
||||
if err := os.MkdirAll(objectDir, 0700); err != nil {
|
||||
err := iodine.New(err, nil)
|
||||
r.CloseWithError(err)
|
||||
blockingWriter.Release(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
fs, err := os.Create(objectPath)
|
||||
if err != nil {
|
||||
err := iodine.New(err, nil)
|
||||
|
||||
@@ -41,13 +41,15 @@ func (f *fsClient) Put(md5HexString string, size int64) (io.WriteCloser, error)
|
||||
}
|
||||
objectDir, _ := filepath.Split(f.path)
|
||||
objectPath := f.path
|
||||
if objectDir != "" {
|
||||
if err := os.MkdirAll(objectDir, 0700); err != nil {
|
||||
err := iodine.New(err, nil)
|
||||
r.CloseWithError(err)
|
||||
blockingWriter.Release(err)
|
||||
return
|
||||
}
|
||||
fs, err := os.Create(objectPath)
|
||||
}
|
||||
fs, err := os.Create(f.path)
|
||||
if err != nil {
|
||||
err := iodine.New(err, nil)
|
||||
r.CloseWithError(err)
|
||||
|
||||
@@ -23,9 +23,5 @@ func GetType(urlStr string) Type {
|
||||
return Object
|
||||
}
|
||||
|
||||
if u.Scheme == "" {
|
||||
return Filesystem
|
||||
}
|
||||
|
||||
return Unknown
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user