Browse Source

adjust deletion ordering

Chris Lu 4 years ago
parent
commit
98175548c2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      weed/filesys/file.go

+ 1 - 1
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