Clover.app skip for now a new functionalty that crash

This commit is contained in:
vectorsigma72 2020-04-12 22:31:52 +02:00
parent 0e8cdd99aa
commit 4bed728157
2 changed files with 8 additions and 6 deletions

View File

@ -699,17 +699,18 @@ final class ThemeManager: NSObject, URLSessionDataDelegate {
// if theme doesn't exist in the repository is up to date since is not part of it!
return true
}
var isOptimized = false
/*
if the repo is not the current one return true
*/
let isOptimized = false
/* fix a crash
if let info = ThemeInfo.unarchive(at: path.addPath(kThemeInfoFile)) {
if info.user != self.user || info.repo != self.repo {
return true
}
isOptimized = info.optimized
}
}*/
let plistPath = "\(self.themeManagerIndexDir)/Themes/\(theme).plist"
guard var plist = NSMutableDictionary(contentsOfFile: plistPath) as? [String : String] else {
@ -799,12 +800,12 @@ final class ThemeManager: NSObject, URLSessionDataDelegate {
var images : [String] = [String]()
let enumerator = fm.enumerator(atPath: path)
/*
if var info = ThemeInfo.unarchive(at: path.addPath(kThemeInfoFile)) {
info.optimized = true
// write back
try? info.archive().write(to: URL(fileURLWithPath: path.addPath(kThemeInfoFile)))
}
}*/
while let file = enumerator?.nextObject() as? String {
if file.fileExtension == "png" || file.fileExtension == "icns" {

View File

@ -485,11 +485,12 @@ NSComboBoxDataSource {
try? fm.removeItem(atPath: themeDest)
do {
try fm.moveItem(atPath: themePath, toPath: themeDest)
/*
let ti = ThemeInfo(user: self.manager!.user,
repo: self.manager!.repo,
optimized: false).archive()
try ti.write(to:
URL(fileURLWithPath: themeDest.addPath(kThemeInfoFile)))
URL(fileURLWithPath: themeDest.addPath(kThemeInfoFile)))*/
NSSound(named: "Glass")?.play()
} catch {