Merge pull request #3818 from stuartbreckenridge/fix-3817

Ignores files in __MACOSX folder
This commit is contained in:
Brent Simmons
2023-02-05 17:24:40 -08:00
committed by GitHub

View File

@@ -77,6 +77,10 @@ public class ArticleThemeDownloader: Logging {
private func findThemeFile(in searchPath: String) -> String? {
if let directoryContents = FileManager.default.enumerator(atPath: searchPath) {
while let file = directoryContents.nextObject() as? String {
if file.hasPrefix("__MACOSX/") {
logger.debug("Ignoring theme file in __MACOSX folder.")
continue
}
if file.hasSuffix(".nnwtheme") {
return file
}