1
0
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:
Harshavardhana
2015-04-22 11:53:15 -07:00
parent 24ba355be7
commit 3af75c8aba
3 changed files with 16 additions and 16 deletions

View File

@@ -43,11 +43,13 @@ func (f *fsClient) Put(md5HexString string, size int64) (io.WriteCloser, error)
}
objectDir, _ := filepath.Split(f.path)
objectPath := f.path
if err := os.MkdirAll(objectDir, 0700); err != nil {
err := iodine.New(err, nil)
r.CloseWithError(err)
blockingWriter.Release(err)
return
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 {