Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-flatfs
Commits
862f5340
Unverified
Commit
862f5340
authored
Apr 09, 2020
by
Will Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional opening in shared_delete mode
parent
da6967dd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
flatfs.go
flatfs.go
+2
-2
util_unix.go
util_unix.go
+5
-1
util_windows.go
util_windows.go
+4
-0
No files found.
flatfs.go
View file @
862f5340
...
...
@@ -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
:=
o
s
.
O
pen
(
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
:=
o
s
.
O
pen
(
path
)
dir
,
err
:=
open
(
path
)
if
err
!=
nil
{
if
os
.
IsNotExist
(
err
)
{
// not an error if the file disappeared
...
...
util_unix.go
View file @
862f5340
...
...
@@ -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
)
}
util_windows.go
View file @
862f5340
...
...
@@ -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
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment