aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/storage/drivers/btrfs/btrfs.go')
-rw-r--r--vendor/github.com/containers/storage/drivers/btrfs/btrfs.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go b/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go
index be44390da..0b5d1c510 100644
--- a/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go
+++ b/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go
@@ -18,7 +18,6 @@ import "C"
import (
"fmt"
"io/fs"
- "io/ioutil"
"math"
"os"
"path"
@@ -524,7 +523,7 @@ func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {
if err := idtools.MkdirAllAs(quotas, 0700, rootUID, rootGID); err != nil {
return err
}
- if err := ioutil.WriteFile(path.Join(quotas, id), []byte(fmt.Sprint(driver.options.size)), 0644); err != nil {
+ if err := os.WriteFile(path.Join(quotas, id), []byte(fmt.Sprint(driver.options.size)), 0644); err != nil {
return err
}
}
@@ -643,7 +642,7 @@ func (d *Driver) Get(id string, options graphdriver.MountOpts) (string, error) {
return "", fmt.Errorf("%s: not a directory", dir)
}
- if quota, err := ioutil.ReadFile(d.quotasDirID(id)); err == nil {
+ if quota, err := os.ReadFile(d.quotasDirID(id)); err == nil {
if size, err := strconv.ParseUint(string(quota), 10, 64); err == nil && size >= d.options.minSpace {
if err := d.enableQuota(); err != nil {
return "", err