Skip to content

Commit

Permalink
fix: path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Nov 22, 2021
1 parent b9b17cb commit b54bf59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ios/Plugin/CapacitorUpdater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ extension FileManager {
let publicFolder = documentsUrl.appendingPathComponent("public")
let r = Just.get(url)
if r.ok {
if (FileManager.default.createFile(atPath: destZip.absoluteString, contents: r.content, attributes: nil)) {
print("File created successfully.", destZip.absoluteString)
SSZipArchive.unzipFile(atPath: destZip.absoluteString, toDestination: dest.absoluteString)
if (FileManager.default.createFile(atPath: destZip.path, contents: r.content, attributes: nil)) {
print("File created successfully.", destZip.path)
SSZipArchive.unzipFile(atPath: destZip.path, toDestination: dest.path)
do {
let files = try FileManager.default.contentsOfDirectory(atPath: dest.absoluteString)
let files = try FileManager.default.contentsOfDirectory(atPath: dest.path)
print(files)
for file in files {
let urlFile = URL.init(string: file)!
Expand Down

0 comments on commit b54bf59

Please sign in to comment.