diff --git a/BXSwiftUtils/Files/URL+Contents.swift b/BXSwiftUtils/Files/URL+Contents.swift index e8fa937..01e373e 100644 --- a/BXSwiftUtils/Files/URL+Contents.swift +++ b/BXSwiftUtils/Files/URL+Contents.swift @@ -56,6 +56,7 @@ public extension URL handle.seek(toFileOffset: offset) handle.write(data) handle.synchronizeFile() + handle.closeFile() // Return the number of bytes that were written