Resolved use of deprecated package in directory cleanup function.
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
@@ -309,7 +308,7 @@ func CleanupDirectory(path string) {
|
|||||||
if err := os.MkdirAll(path, 0o750); err != nil {
|
if err := os.MkdirAll(path, 0o750); err != nil {
|
||||||
log.Fatalf("Unable to create '%s'. Please check the ownership and permissions: %s\n", path, err)
|
log.Fatalf("Unable to create '%s'. Please check the ownership and permissions: %s\n", path, err)
|
||||||
}
|
}
|
||||||
entries, err := ioutil.ReadDir(path)
|
entries, err := os.ReadDir(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to read contents of '%s'. Please check the ownership and permissions: %s\n", path, err)
|
log.Fatalf("Unable to read contents of '%s'. Please check the ownership and permissions: %s\n", path, err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user