Skip to content

Commit

Permalink
Merge pull request xi-editor#472 from nangtrongvuon/remove-old-tmp-log
Browse files Browse the repository at this point in the history
Remove old tmp log
  • Loading branch information
nangtrongvuon authored Jul 8, 2019
2 parents ee4383a + da88817 commit fb9f67e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions Sources/XiEditor/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
return applicationDirectory
}()

// The default name for XiEditor's error logs
let defaultCoreLogName = "xi_tmp.log"

lazy var errorLogDirectory: URL? = {
let logDirectory = FileManager.default.urls(
for: .libraryDirectory,
Expand Down Expand Up @@ -191,17 +188,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
renameCliToggle()
}

// Clean up temporary Xi stderr log
func applicationWillTerminate(_ notification: Notification) {
if let tmpErrLogFile = errorLogDirectory?.appendingPathComponent(defaultCoreLogName) {
do {
try FileManager.default.removeItem(at: tmpErrLogFile)
} catch let err as NSError {
print("Failed to remove temporary log file. \(err)")
}
}
}

// MARK: - CLI Menu Items
@IBOutlet weak var cliToggle: NSMenuItem!

Expand Down

0 comments on commit fb9f67e

Please sign in to comment.