Skip to content

Commit

Permalink
PVFile don’t crash on duplicacte write
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Jan 12, 2025
1 parent 5e54226 commit eb2bf0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public extension PVFile {
fileSize = attr.fileSize()

// Cache the size only if we're not frozen
if !self.isFrozen, let realm = self.realm {
if !self.isFrozen, let realm = self.realm, !realm.isInWriteTransaction {
do {
try realm.write {
self.sizeCache = Int(fileSize)
Expand Down

0 comments on commit eb2bf0f

Please sign in to comment.