fs: Verify if parent is an object before i/o. (#4304)

PutObject() needs to verify and fail.

Fixes #4301
This commit is contained in:
Harshavardhana
2017-05-09 17:46:46 -07:00
committed by GitHub
parent 298b470f69
commit fa3f6d75b6
7 changed files with 108 additions and 23 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ func fsStatFile(statFile string) (os.FileInfo, error) {
return nil, traceError(err)
}
if fi.IsDir() {
return nil, traceError(errFileNotFound)
return nil, traceError(errFileAccessDenied)
}
return fi, nil
}