mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 19:08:55 +00:00
Call open file once on FreeBSD.
This commit is contained in:
parent
a1c8dac561
commit
a8be9c32d0
@ -7,11 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (node *Node) OpenForReading() (*os.File, error) {
|
func (node *Node) OpenForReading() (*os.File, error) {
|
||||||
file, err := os.OpenFile(node.path, os.O_RDONLY, 0)
|
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
||||||
if os.IsPermission(err) {
|
|
||||||
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
|
||||||
}
|
|
||||||
return file, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (node *Node) fillTimes(stat *syscall.Stat_t) {
|
func (node *Node) fillTimes(stat *syscall.Stat_t) {
|
||||||
|
Loading…
Reference in New Issue
Block a user