mirror of
https://github.com/restic/restic.git
synced 2025-12-04 02:31:57 +00:00
Replace most usages of ioutil with the underlying function
The ioutil functions are deprecated since Go 1.17 and only wrap another library function. Thus directly call the underlying function. This commit only mechanically replaces the function calls.
This commit is contained in:
@@ -36,7 +36,7 @@ func fixpath(name string) string {
|
||||
|
||||
// TempFile creates a temporary file which is marked as delete-on-close
|
||||
func TempFile(dir, prefix string) (f *os.File, err error) {
|
||||
// slightly modified implementation of ioutil.TempFile(dir, prefix) to allow us to add
|
||||
// slightly modified implementation of os.CreateTemp(dir, prefix) to allow us to add
|
||||
// the FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE flags.
|
||||
// These provide two large benefits:
|
||||
// FILE_ATTRIBUTE_TEMPORARY tells Windows to keep the file in memory only if possible
|
||||
|
||||
Reference in New Issue
Block a user