additional opening in shared_delete mode

parent da6967dd
......@@ -728,7 +728,7 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) {
}
func (fs *Datastore) walkTopLevel(path string, result *query.ResultBuilder) error {
dir, err := os.Open(path)
dir, err := open(path)
if err != nil {
return err
}
......@@ -1054,7 +1054,7 @@ func (fs *Datastore) tempFile() (*os.File, error) {
}
func (fs *Datastore) walk(path string, qrb *query.ResultBuilder) error {
dir, err := os.Open(path)
dir, err := open(path)
if err != nil {
if os.IsNotExist(err) {
// not an error if the file disappeared
......
......@@ -7,10 +7,14 @@ import (
"os"
)
func tempFile(dir, pattern string) (f *os.File, err error) {
func tempFile(dir, pattern string) (*os.File, error) {
return ioutil.TempFile(dir, pattern)
}
func readFile(filename string) ([]byte, error) {
return ioutil.ReadFile(filename)
}
func open(name string) (*os.File, error) {
return os.Open(name)
}
......@@ -91,3 +91,7 @@ func readFile(filename string) ([]byte, error) {
return ioutil.ReadAll(f)
}
func open(name string) (*os.File, error) {
return goissue34681.Open(name)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment