fs get() should return client.PathInsufficientPermission{} in case of EPERM error
This commit is contained in:
@@ -152,6 +152,9 @@ func (f *fsClient) Put(size int64, data io.Reader) *probe.Error {
|
||||
func (f *fsClient) get() (io.ReadCloser, int64, *probe.Error) {
|
||||
body, e := os.Open(f.PathURL.Path)
|
||||
if e != nil {
|
||||
if os.IsPermission(e) {
|
||||
return nil, 0, probe.NewError(client.PathInsufficientPermission{Path: f.PathURL.Path})
|
||||
}
|
||||
return nil, 0, probe.NewError(e)
|
||||
}
|
||||
content, err := f.getFSMetadata()
|
||||
|
||||
Reference in New Issue
Block a user