From 98175548c27ba604fe0443bff38e07ec019d2495 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 23 Aug 2020 16:27:12 -0700 Subject: [PATCH] adjust deletion ordering --- weed/filesys/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filesys/file.go b/weed/filesys/file.go index f15eff780..a1b0b2202 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -137,10 +137,10 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f } } } - file.wfs.deleteFileChunks(truncatedChunks) file.entry.Chunks = chunks file.entryViewCache = nil file.reader = nil + file.wfs.deleteFileChunks(truncatedChunks) } file.entry.Attributes.FileSize = req.Size file.dirtyMetadata = true