1.0.0 for iOS is ready to ship
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
//
|
||||
// ZipUtils.swift
|
||||
// OpenClimb
|
||||
//
|
||||
// Created by OpenClimb on 2025-01-17.
|
||||
//
|
||||
|
||||
import Compression
|
||||
import Foundation
|
||||
@@ -169,21 +163,9 @@ struct ZipUtils {
|
||||
entry.filename.dropFirst("\(IMAGES_DIR_NAME)/".count))
|
||||
|
||||
do {
|
||||
|
||||
let documentsURL = FileManager.default.urls(
|
||||
for: .documentDirectory, in: .userDomainMask
|
||||
).first!
|
||||
let imagesDir = documentsURL.appendingPathComponent("images")
|
||||
try FileManager.default.createDirectory(
|
||||
at: imagesDir, withIntermediateDirectories: true)
|
||||
|
||||
let newImageURL = imagesDir.appendingPathComponent(originalFilename)
|
||||
try entry.data.write(to: newImageURL)
|
||||
|
||||
importedImagePaths[originalFilename] = newImageURL.path
|
||||
print(
|
||||
"Successfully imported image: \(originalFilename) -> \(newImageURL.path)"
|
||||
)
|
||||
let filename = try ImageManager.shared.saveImportedImage(
|
||||
entry.data, filename: originalFilename)
|
||||
importedImagePaths[originalFilename] = filename
|
||||
} catch {
|
||||
print("Failed to import image \(originalFilename): \(error)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user