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
5e5d4575
Commit
5e5d4575
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
e7adebaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
flatfs_test.go
flatfs_test.go
+5
-2
No files found.
flatfs_test.go
View file @
5e5d4575
...
...
@@ -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