mirror of
https://github.com/restic/restic.git
synced 2026-05-11 21:15:23 +00:00
Call open file once on FreeBSD.
This commit is contained in:
+1
-5
@@ -7,11 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func (node *Node) OpenForReading() (*os.File, error) {
|
||||
file, err := os.OpenFile(node.path, os.O_RDONLY, 0)
|
||||
if os.IsPermission(err) {
|
||||
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
||||
}
|
||||
return file, err
|
||||
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
||||
}
|
||||
|
||||
func (node *Node) fillTimes(stat *syscall.Stat_t) {
|
||||
|
||||
Reference in New Issue
Block a user