aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-02 20:01:26 +0200
committerJakob Unterwurzacher2021-08-02 20:01:26 +0200
commitc3c9513e6504276698ed1f50a259d4333476acf8 (patch)
treef5cf3a6cf76dc36ebf04c5eaa365f80355fa0494 /internal/fusefrontend/file.go
parent75cf36fe7b4e64379ba67804d8c5ac56e25f63b7 (diff)
fusefrontend: add quirks for MacOS ExFAT
This also moves the quirks logic into fusefrontend. Fixes https://github.com/rfjakob/gocryptfs/issues/585
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index 4866e65..304ba7f 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -118,7 +118,7 @@ func (f *File) createHeader() (fileID []byte, err error) {
h := contentenc.RandomHeader()
buf := h.Pack()
// Prevent partially written (=corrupt) header by preallocating the space beforehand
- if !f.rootNode.args.NoPrealloc {
+ if !f.rootNode.args.NoPrealloc && f.rootNode.quirks&quirkBrokenFalloc == 0 {
err = syscallcompat.EnospcPrealloc(f.intFd(), 0, contentenc.HeaderLen)
if err != nil {
if !syscallcompat.IsENOSPC(err) {