Skip to content

Commit

Permalink
Fix bug in ensureLaunchAgentsDirOwner().
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuyuzhou committed Oct 20, 2017
1 parent 959c824 commit b1d81b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ShadowsocksX-NG/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
if attrs[FileAttributeKey.ownerAccountName] as! String != NSUserName() {
//try fileMgr.setAttributes([FileAttributeKey.ownerAccountName: NSUserName()], ofItemAtPath: dirPath)
let bashFilePath = Bundle.main.path(forResource: "fix_dir_owner.sh", ofType: nil)!
let script = "do shell script \"bash \\\"(bashFilePath)\\\" \(NSUserName()) \" with administrator privileges"
let script = "do shell script \"bash \\\"\(bashFilePath)\\\" \(NSUserName()) \" with administrator privileges"
if let appleScript = NSAppleScript(source: script) {
var err: NSDictionary? = nil
appleScript.executeAndReturnError(&err)
Expand Down

0 comments on commit b1d81b6

Please sign in to comment.