1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Close sparse files when done

This commit is contained in:
Michael Crosby 2013-11-13 17:05:32 -08:00
parent 7682ec04cd
commit bbc9fc7907

View file

@ -120,6 +120,7 @@ func (devices *DeviceSet) ensureImage(name string, size int64) (string, error) {
if err != nil {
return "", err
}
defer file.Close()
if err = file.Truncate(size); err != nil {
return "", err