aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/fusefrontend/fs.go2
-rw-r--r--internal/fusefrontend/xattr.go2
-rw-r--r--internal/syscallcompat/sys_common.go4
3 files changed, 5 insertions, 3 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index 8a3935f..582e6a1 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -440,7 +440,7 @@ func (fs *FS) Symlink(target string, linkName string, context *fuse.Context) (co
return fuse.ToStatus(err)
}
defer dirfd.Close()
- var cTarget string = target
+ cTarget := target
if !fs.args.PlaintextNames {
// Symlinks are encrypted like file contents (GCM) and base64-encoded
cTarget = fs.encryptSymlinkTarget(target)
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index 2bbdf41..eea67ad 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -23,7 +23,7 @@ var xattrNameIV = []byte("xattr_name_iv_xx")
// encrypted original name.
var xattrStorePrefix = "user.gocryptfs."
-// GetXAttr: read the value of extended attribute "attr".
+// GetXAttr reads the value of extended attribute "attr".
// Implements pathfs.Filesystem.
func (fs *FS) GetXAttr(path string, attr string, context *fuse.Context) ([]byte, fuse.Status) {
if fs.isFiltered(path) {
diff --git a/internal/syscallcompat/sys_common.go b/internal/syscallcompat/sys_common.go
index 77cdb07..c1fd00a 100644
--- a/internal/syscallcompat/sys_common.go
+++ b/internal/syscallcompat/sys_common.go
@@ -6,7 +6,9 @@ import (
"golang.org/x/sys/unix"
)
-const PATH_MAX = 4096 // not defined on Darwin
+// PATH_MAX is the maximum allowed path length on Linux.
+// It is not defined on Darwin, so we use the Linux value.
+const PATH_MAX = 4096
// Readlinkat exists both in Linux and in MacOS 10.10+. We may add an
// emulated version for users on older MacOS versions if there is