cleanup imports
This commit is contained in:
parent
b9b32e5647
commit
fc549c9462
1 changed files with 2 additions and 3 deletions
|
@ -2,7 +2,6 @@ package restorer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
stdfs "io/fs"
|
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -82,7 +81,7 @@ func createFile(path string, createSize int64, sparse bool, allowRecursiveDelete
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var fi stdfs.FileInfo
|
var fi os.FileInfo
|
||||||
if f != nil {
|
if f != nil {
|
||||||
// stat to check that we've opened a regular file
|
// stat to check that we've opened a regular file
|
||||||
fi, err = f.Stat()
|
fi, err = f.Stat()
|
||||||
|
@ -135,7 +134,7 @@ func createFile(path string, createSize int64, sparse bool, allowRecursiveDelete
|
||||||
return ensureSize(f, fi, createSize, sparse)
|
return ensureSize(f, fi, createSize, sparse)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ensureSize(f *os.File, fi stdfs.FileInfo, createSize int64, sparse bool) (*os.File, error) {
|
func ensureSize(f *os.File, fi os.FileInfo, createSize int64, sparse bool) (*os.File, error) {
|
||||||
if sparse {
|
if sparse {
|
||||||
err := truncateSparse(f, createSize)
|
err := truncateSparse(f, createSize)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue