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
This commit is contained in:
Denis Dzyubenko authored and Kornel committed 2020-09-10 13:40:34 +01:00
1 parent f2fc729b69
commit 7233bb93e7
1 file changed
+2 -1
+2 -1
View File
@@ -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 = []
}