From 7233bb93e79bb67e0ce2dc6749f3061a410d4eaf Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 10 Sep 2020 14:00:58 +0200 Subject: [PATCH] generate_appcast follow symbolic links When archives are stored as symlinks e.g. due to storing binary files in a git-annex repository, everything works file except file size in the generate feed xml file. This patch makes generate_appcast correctly determine file size by following the symlink --- generate_appcast/ArchiveItem.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate_appcast/ArchiveItem.swift b/generate_appcast/ArchiveItem.swift index 7268df3954..b78a451317 100644 --- a/generate_appcast/ArchiveItem.swift +++ b/generate_appcast/ArchiveItem.swift @@ -63,7 +63,8 @@ class ArchiveItem: CustomStringConvertible { } else { self.publicEdKey = nil } - self.archiveFileAttributes = try FileManager.default.attributesOfItem(atPath: self.archivePath.path) + let path = (self.archivePath.path as NSString).resolvingSymlinksInPath + self.archiveFileAttributes = try FileManager.default.attributesOfItem(atPath: path) self.deltas = [] }