mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Skip en and Base when recording Sparkle locales in generate_appcast (#2925)
The guard compared the directory name (e.g. "en.lproj") against "en" and "Base", so it never matched and both locales were recorded in sparkle:deltaFromSparkleLocales, taking up slots of the 7 sampled locales. Compare the locale name after dropping the .lproj extension instead.
This commit is contained in:
1 parent
07db2480ad
commit
7a8baa664b
1 file changed
+5
-4
@@ -334,14 +334,15 @@ class ArchiveItem: CustomStringConvertible {
|
||||
guard filename.hasSuffix(localeExtension) else {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
let locale = String(filename.dropLast(localeExtensionCount))
|
||||
|
||||
// English and Base directories are the least likely to be stripped,
|
||||
// so let's not bother recording them.
|
||||
guard filename != "en" && filename != "Base" else {
|
||||
guard locale != "en" && locale != "Base" else {
|
||||
continue
|
||||
}
|
||||
|
||||
let locale = String(filename.dropLast(localeExtensionCount))
|
||||
|
||||
localesPresent.append(locale)
|
||||
localeIndex += 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user