diff --git a/submodules/Postbox/Sources/MediaBox.swift b/submodules/Postbox/Sources/MediaBox.swift index 287bb9c68f..43d72b141c 100644 --- a/submodules/Postbox/Sources/MediaBox.swift +++ b/submodules/Postbox/Sources/MediaBox.swift @@ -1704,10 +1704,10 @@ public final class MediaBox { public func removeCachedResources(_ ids: [MediaResourceId], force: Bool = false, notify: Bool = false) -> Signal { return Signal { subscriber in self.dataQueue.async { - let uniqueIds = Set(ids.map { $0.stringRepresentation }) - var pathsToDelete: [String] = [] + //let uniqueIds = Set(ids.map { $0.stringRepresentation }) + let pathsToDelete: [String] = [] - for cacheType in ["cache", "short-cache"] { + /*for cacheType in ["cache", "short-cache"] { if let enumerator = FileManager.default.enumerator(at: URL(fileURLWithPath: "\(self.basePath)/\(cacheType)"), includingPropertiesForKeys: [], options: [.skipsSubdirectoryDescendants], errorHandler: nil) { while let item = enumerator.nextObject() { guard let url = item as? NSURL, let path = url.path, let fileName = url.lastPathComponent else { @@ -1722,7 +1722,7 @@ public final class MediaBox { } } } - } + }*/ var count: Int = 0 let totalCount = ids.count * 3 + pathsToDelete.count