From a40879b17237546877a3463d76d70ed23d806a71 Mon Sep 17 00:00:00 2001 From: Matus Littva Date: Mon, 23 Jul 2018 14:32:23 +0200 Subject: [PATCH] Whitespaces handling for fileOutputHandler. --- Zip/Zip.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zip/Zip.swift b/Zip/Zip.swift index b326caa..c4ada09 100644 --- a/Zip/Zip.swift +++ b/Zip/Zip.swift @@ -230,7 +230,8 @@ public class Zip { } if let fileHandler = fileOutputHandler, - let fileUrl = URL(string: fullPath) { + let encodedString = fullPath.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed), + let fileUrl = URL(string: encodedString) { fileHandler(fileUrl) } -- 2.26.2