[#211] fstree: Consider ENOSPC a logical error
We already do this for file writing, however directory creation can also fail. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
0948a280fa
commit
48e7100556
1 changed files with 3 additions and 0 deletions
|
@ -228,6 +228,9 @@ func (t *FSTree) Put(prm common.PutPrm) (common.PutRes, error) {
|
|||
p := t.treePath(prm.Address)
|
||||
|
||||
if err := util.MkdirAllX(filepath.Dir(p), t.Permissions); err != nil {
|
||||
if errors.Is(err, syscall.ENOSPC) {
|
||||
return common.PutRes{}, common.ErrNoSpace
|
||||
}
|
||||
return common.PutRes{}, err
|
||||
}
|
||||
if !prm.DontCompress {
|
||||
|
|
Loading…
Reference in a new issue