From 6e960b1437f4e5be75cf408de62d318e2f8f0abb Mon Sep 17 00:00:00 2001 From: yicheng Date: Sun, 19 Aug 2018 11:14:41 +0800 Subject: [PATCH] Fix: open config => config folder --- ClashX/AppDelegate.swift | 3 ++- ClashX/Base.lproj/Main.storyboard | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ClashX/AppDelegate.swift b/ClashX/AppDelegate.swift index 0e05680..d554367 100644 --- a/ClashX/AppDelegate.swift +++ b/ClashX/AppDelegate.swift @@ -127,6 +127,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func failLaunchProtect(){ + return let x = UserDefaults.standard var launch_fail_times:Int = 0 if let xx = x.object(forKey: "launch_fail_times") as? Int {launch_fail_times = xx } @@ -263,7 +264,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { } @IBAction func openConfigFolder(_ sender: Any) { - let path = (NSHomeDirectory() as NSString).appendingPathComponent("/.config/clash/config.ini") + let path = (NSHomeDirectory() as NSString).appendingPathComponent("/.config/clash") NSWorkspace.shared.openFile(path) } diff --git a/ClashX/Base.lproj/Main.storyboard b/ClashX/Base.lproj/Main.storyboard index 1af5fbe..b6d0c71 100644 --- a/ClashX/Base.lproj/Main.storyboard +++ b/ClashX/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -106,7 +106,7 @@ - +