mirror of
https://github.com/restic/restic.git
synced 2025-05-21 17:39:11 +00:00
Remove redundant code.
This commit is contained in:
parent
458e4bb3f7
commit
3f992c3d6e
@ -6,12 +6,8 @@ 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)
|
|
||||||
if os.IsPermission(err) {
|
|
||||||
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
return os.OpenFile(node.path, os.O_RDONLY, 0)
|
||||||
}
|
}
|
||||||
return file, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// mknod() creates a filesystem node (file, device
|
// mknod() creates a filesystem node (file, device
|
||||||
// special file, or named pipe) named pathname, with attributes
|
// special file, or named pipe) named pathname, with attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user