aboutsummaryrefslogtreecommitdiff
path: root/tests/test_helpers/mount_unmount.go
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot]2025-07-07 18:18:12 +0000
committerrfjakob2025-07-08 19:54:14 +0200
commit386232f39ede046d6453a0990ad40f2d86a26f53 (patch)
tree8703ecc54e402af3dbcd3122f840c21f57242437 /tests/test_helpers/mount_unmount.go
parent8f5df19b353e02ffba842fd1b15ccf93da7ee3b4 (diff)
Fix all staticcheck errors in gocryptfs codebase
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Add staticcheck to test.bash for continuous static analysis Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Fix nil pointer dereference in timesToTimespec function The previous fix for deprecated fuse.UtimeToTimespec caused a panic because unix.TimeToTimespec doesn't handle nil pointers. This fix properly handles nil pointers by using unix.UTIME_OMIT while still using the non-deprecated unix.TimeToTimespec function. Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Undo SA6002 changes and add staticcheck ignore directive instead Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
Diffstat (limited to 'tests/test_helpers/mount_unmount.go')
-rw-r--r--tests/test_helpers/mount_unmount.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go
index 46c64c9..4abc432 100644
--- a/tests/test_helpers/mount_unmount.go
+++ b/tests/test_helpers/mount_unmount.go
@@ -187,7 +187,7 @@ func UnmountErr(dir string) (err error) {
err = cmd.Run()
if err == nil {
if len(fdsNow) > len(fds)+maxCacheFds {
- return fmt.Errorf("fd leak in gocryptfs process? pid=%d dir=%q, fds:\nold=%v \nnew=%v\n", pid, dir, fds, fdsNow)
+ return fmt.Errorf("fd leak in gocryptfs process? pid=%d dir=%q, fds:\nold=%v \nnew=%v", pid, dir, fds, fdsNow)
}
return nil
}