mirror of
https://github.com/TuringSoftware/CrystalFetch.git
synced 2025-12-26 07:19:04 +08:00
worker: try to use same directory for the same file
This commit is contained in:
parent
d76d953697
commit
8482fec6be
1 changed files with 2 additions and 1 deletions
|
|
@ -337,7 +337,8 @@ extension Worker {
|
|||
|
||||
func download(_ file: ESDCatalog.File) {
|
||||
let cacheUrl = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]
|
||||
let baseUrl = cacheUrl.appendingPathComponent(UUID().uuidString)
|
||||
let uuid = file.sha1.count > 0 ? file.sha1 : UUID().uuidString
|
||||
let baseUrl = cacheUrl.appendingPathComponent(uuid)
|
||||
let esdUrl = baseUrl.appendingPathComponent(file.name)
|
||||
let isoUrl = esdUrl.deletingPathExtension().appendingPathExtension("iso")
|
||||
withBusyIndication { [self] in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue