Skip to content

Commit

Permalink
downloader: skip crc for speed and fix name check
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Dec 30, 2021
1 parent 3d08348 commit f08fc5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Platform/Shared/UTMImportFromWebTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class UTMImportFromWebTask: NSObject, UTMDownloadable, URLSessionDelegate, URLSe
let downloadedZip = tempDir.appendingPathComponent(originalFilename)
var fileURL: URL? = nil
do {
if fileManager.fileExists(atPath: downloadedZip.absoluteString) {
if fileManager.fileExists(atPath: downloadedZip.path) {
try fileManager.removeItem(at: downloadedZip)
}
try fileManager.moveItem(at: location, to: downloadedZip)
Expand Down Expand Up @@ -105,7 +105,7 @@ class UTMImportFromWebTask: NSObject, UTMDownloadable, URLSessionDelegate, URLSe
for file in containedFiles {
let relativePath = file.path.replacingOccurrences(of: utmFolderInZip.path, with: "")
let isDirectory = file.path.hasSuffix("/")
_ = try archive.extract(file, to: destinationURL.appendingPathComponent(relativePath, isDirectory: isDirectory))
_ = try archive.extract(file, to: destinationURL.appendingPathComponent(relativePath, isDirectory: isDirectory), skipCRC32: true)
}
return destinationURL
} else {
Expand Down

0 comments on commit f08fc5d

Please sign in to comment.