Fix image version read from url

This commit is contained in:
Christoph Hagen 2023-01-15 02:02:28 +01:00
parent a474b509c1
commit 7a969185e9

View File

@ -181,7 +181,7 @@ final class CapServer: ServerOwner {
return
}
var sorted: [(id: Int, url: URL)] = images.compactMap {
guard let id = Int($0.deletingPathExtension().lastPathComponent) else {
guard let id = Int($0.deletingPathExtension().lastPathComponent.components(separatedBy: "-").last!) else {
return nil
}
return (id, $0)