aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-04-10 12:36:43 +0200
committerJakob Unterwurzacher2016-04-10 12:36:43 +0200
commit63d3e517349a6c4774a3f75f2fa039c780eaf5f9 (patch)
tree9a2265fd2b85991b4cc85f3304cff88c0dc26828 /internal/fusefrontend/fs_dir.go
parente42e46c97cc46b731b63f1edfe1a4407161057f9 (diff)
longnames: use symbolic constants instead of naked ints
Diffstat (limited to 'internal/fusefrontend/fs_dir.go')
-rw-r--r--internal/fusefrontend/fs_dir.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go
index ebf7015..bcb93af 100644
--- a/internal/fusefrontend/fs_dir.go
+++ b/internal/fusefrontend/fs_dir.go
@@ -207,21 +207,22 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f
if fs.args.LongNames {
isLong := nametransform.IsLongName(cName)
- if isLong == 1 {
+ if isLong == nametransform.LongNameContent {
cNameLong, err := nametransform.ReadLongName(filepath.Join(cDirAbsPath, cName))
if err != nil {
toggledlog.Warn.Printf("Could not read long name for file %s, skipping file", cName)
continue
}
cName = cNameLong
- } else if isLong == 2 {
+ } else if isLong == nametransform.LongNameFilename {
// ignore "gocryptfs.longname.*.name"
continue
}
}
name, err := fs.nameTransform.DecryptName(cName, cachedIV)
if err != nil {
- toggledlog.Warn.Printf("Skipping invalid name '%s' in dir '%s': %s", cName, cDirName, err)
+ toggledlog.Warn.Printf("Skipping invalid name '%s' in dir '%s': %s",
+ cName, cDirName, err)
continue
}