From 34e936328f085889b6d3ca35bf967d6b86dc9782 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Mon, 29 Oct 2018 16:59:38 +0100 Subject: [PATCH] Added closing of file to be on the safe side --- BXSwiftUtils/Files/URL+Contents.swift | 1 + 1 file changed, 1 insertion(+) 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