From 7a969185e97c07607e1e54068f21e1694dcd6f06 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 15 Jan 2023 02:02:28 +0100 Subject: [PATCH] Fix image version read from url --- Sources/App/CapServer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/App/CapServer.swift b/Sources/App/CapServer.swift index 893249b..f981246 100644 --- a/Sources/App/CapServer.swift +++ b/Sources/App/CapServer.swift @@ -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)