From f7a800c7ef91e8de272fcb5403c31cc8ca674d22 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Tue, 31 Mar 2020 16:25:09 +0200 Subject: [PATCH] fix(ios): writeFile failing on root folders (#2670) --- ios/Capacitor/Capacitor/Plugins/Filesystem.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Capacitor/Capacitor/Plugins/Filesystem.swift b/ios/Capacitor/Capacitor/Plugins/Filesystem.swift index 0618dd555..201a1d6ee 100644 --- a/ios/Capacitor/Capacitor/Plugins/Filesystem.swift +++ b/ios/Capacitor/Capacitor/Plugins/Filesystem.swift @@ -103,7 +103,7 @@ public class CAPFilesystemPlugin : CAPPlugin { } do { - if !FileManager.default.fileExists(atPath: fileUrl.deletingLastPathComponent().absoluteString) { + if !FileManager.default.fileExists(atPath: fileUrl.deletingLastPathComponent().path) { if recursive { try FileManager.default.createDirectory(at: fileUrl.deletingLastPathComponent(), withIntermediateDirectories: recursive, attributes: nil) } else {