File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -391,9 +391,10 @@ func (f *file) GetAttr(a *fuse.Attr) fuse.Status {
391
391
const BrokenAtimeOmit = true
392
392
393
393
func (f * file ) Utimens (a * time.Time , m * time.Time ) fuse.Status {
394
- if a == nil && BrokenAtimeOmit {
394
+ if BrokenAtimeOmit {
395
395
// Band-aid for a nil pointer crash, described in
396
396
// https://github.com/rfjakob/gocryptfs/issues/48
397
+ // Also band-aid for "mtime gets set to atime".
397
398
//
398
399
// TODO drop this once https://github.com/hanwen/go-fuse/pull/131 is
399
400
// merged
Original file line number Diff line number Diff line change @@ -660,7 +660,8 @@ type utimesTestcaseStruct struct {
660
660
func compareUtimes (want [2 ]syscall.Timespec , actual [2 ]syscall.Timespec ) error {
661
661
tsNames := []string {"atime" , "mtime" }
662
662
for i := range want {
663
- if i == 1 {
663
+ if fusefrontend .BrokenAtimeOmit && i == 0 {
664
+ // Don't check atime. It's broken in go-fuse.
664
665
// TODO remove this once the pull request is merged:
665
666
// https://github.com/hanwen/go-fuse/pull/131
666
667
continue
@@ -702,7 +703,7 @@ func doTestUtimesNano(t *testing.T, path string) {
702
703
if fusefrontend .BrokenAtimeOmit {
703
704
// TODO remove this once the pull request is merged:
704
705
// https://github.com/hanwen/go-fuse/pull/131
705
- utimeTestcases = utimeTestcases [: 1 ]
706
+ utimeTestcases = utimeTestcases [0 : 0 ]
706
707
}
707
708
for i , tc := range utimeTestcases {
708
709
err := syscall .UtimesNano (path , tc .in [:])
You can’t perform that action at this time.
0 commit comments