forked from TrueCloudLab/frostfs-node
[#2208] fstree: Remove file if there was an error during write
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>carpawell/fix/multiple-cache-update-requests-FROST
parent
67c97c6804
commit
792319a044
|
@ -244,6 +244,7 @@ func (t *FSTree) Put(prm common.PutPrm) (common.PutRes, error) {
|
|||
var pe *fs.PathError
|
||||
if errors.As(err, &pe) && pe.Err == syscall.ENOSPC {
|
||||
err = common.ErrNoSpace
|
||||
_ = os.RemoveAll(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue