diff options
author | Jakob Unterwurzacher | 2016-04-10 12:36:43 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-04-10 12:36:43 +0200 |
commit | 63d3e517349a6c4774a3f75f2fa039c780eaf5f9 (patch) | |
tree | 9a2265fd2b85991b4cc85f3304cff88c0dc26828 /internal/fusefrontend/fs_dir.go | |
parent | e42e46c97cc46b731b63f1edfe1a4407161057f9 (diff) |
longnames: use symbolic constants instead of naked ints
Diffstat (limited to 'internal/fusefrontend/fs_dir.go')
-rw-r--r-- | internal/fusefrontend/fs_dir.go | 7 |
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 } |