aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/rfs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 19:01:50 +0200
committerJakob Unterwurzacher2016-09-25 19:02:12 +0200
commit166ba74a053898a52ff2e48125c1df97f35a85fd (patch)
tree291dc1be32c88aa9fa4784085afff5c349cc939a /internal/fusefrontend_reverse/rfs.go
parentc7b3150afc26a6992c6059002c84b1afc236f663 (diff)
tests: enable all go vet checks
...and fix reported errors: internal/fusefrontend_reverse/rfile.go:40: github.com/rfjakob/gocryptfs/internal/contentenc.FileHeader composite literal uses unkeyed fields internal/fusefrontend_reverse/rfs.go:249: github.com/hanwen/go-fuse/fuse.DirEntry composite literal uses unkeyed fields internal/fusefrontend_reverse/rfs.go:264: github.com/hanwen/go-fuse/fuse.DirEntry composite literal uses unkeyed fields
Diffstat (limited to 'internal/fusefrontend_reverse/rfs.go')
-rw-r--r--internal/fusefrontend_reverse/rfs.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go
index 06ca07e..8411461 100644
--- a/internal/fusefrontend_reverse/rfs.go
+++ b/internal/fusefrontend_reverse/rfs.go
@@ -246,7 +246,10 @@ func (rfs *reverseFS) OpenDir(cipherPath string, context *fuse.Context) ([]fuse.
// plus one for gocryptfs.diriv.
virtualFiles := make([]fuse.DirEntry, len(entries)+1)
// Virtual gocryptfs.diriv file
- virtualFiles[0] = fuse.DirEntry{syscall.S_IFREG | 0400, nametransform.DirIVFilename}
+ virtualFiles[0] = fuse.DirEntry{
+ Mode: syscall.S_IFREG | 0400,
+ Name: nametransform.DirIVFilename,
+ }
// Actually used entries
nVirtual := 1
@@ -261,7 +264,10 @@ func (rfs *reverseFS) OpenDir(cipherPath string, context *fuse.Context) ([]fuse.
cName = rfs.nameTransform.EncryptName(entries[i].Name, dirIV)
if len(cName) > syscall.NAME_MAX {
cName = nametransform.HashLongName(cName)
- dotNameFile := fuse.DirEntry{syscall.S_IFREG | 0600, cName + nametransform.LongNameSuffix}
+ dotNameFile := fuse.DirEntry{
+ Mode: syscall.S_IFREG | 0600,
+ Name: cName + nametransform.LongNameSuffix,
+ }
virtualFiles[nVirtual] = dotNameFile
nVirtual++
}