remove refs to deprecated io/ioutil

This commit is contained in:
nikk gitanes
2023-07-10 03:14:53 +03:00
parent 4c41f7ddcc
commit 1d875b57b2
8 changed files with 18 additions and 20 deletions

View File

@@ -2,7 +2,6 @@ package torr
import (
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
@@ -143,7 +142,7 @@ func RemTorrent(hashHex string) {
hash := metainfo.NewHashFromHex(hashHex)
if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" {
name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex)
ff, _ := ioutil.ReadDir(name)
ff, _ := os.ReadDir(name)
for _, f := range ff {
os.Remove(filepath.Join(name, f.Name()))
}