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-datastore
Commits
d3aa062d
Commit
d3aa062d
authored
Apr 24, 2015
by
Tommi Virtanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flatfs: Don't test file modes on Windows
parent
58d30fe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
flatfs/flatfs_test.go
flatfs/flatfs_test.go
+5
-2
No files found.
flatfs/flatfs_test.go
View file @
d3aa062d
...
...
@@ -4,6 +4,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"testing"
"github.com/jbenet/go-datastore"
...
...
@@ -182,8 +183,10 @@ func TestStorage(t *testing.T) {
if
!
fi
.
Mode
()
.
IsRegular
()
{
t
.
Errorf
(
"expected a regular file, mode: %04o"
,
fi
.
Mode
())
}
if
g
,
e
:=
fi
.
Mode
()
&
os
.
ModePerm
&
0007
,
os
.
FileMode
(
0000
);
g
!=
e
{
t
.
Errorf
(
"file should not be world accessible: %04o"
,
fi
.
Mode
())
if
runtime
.
GOOS
!=
"windows"
{
if
g
,
e
:=
fi
.
Mode
()
&
os
.
ModePerm
&
0007
,
os
.
FileMode
(
0000
);
g
!=
e
{
t
.
Errorf
(
"file should not be world accessible: %04o"
,
fi
.
Mode
())
}
}
default
:
t
.
Errorf
(
"saw unexpected directory entry: %q %v"
,
path
,
fi
.
Mode
())
...
...
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