Skip to content

Commit

Permalink
Merge pull request XX-net#4555 from cc941201/master
Browse files Browse the repository at this point in the history
Fix mac_helper permission
  • Loading branch information
yeahwu authored Nov 14, 2016
2 parents e1a20c6 + ba4654c commit 4aaa8df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/default/launcher/mac_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ def setupHelper():
except:
rmCommand = "rm \\\"%s\\\"" % helper_path
cpCommand = "cp \\\"%s\\\" \\\"%s\\\"" % (os.path.join(current_path, 'mac_helper'), helper_path)
chmodCommand = "chmod 4755 \\\"%s\\\"" % helper_path
chownCommand = "chown root \\\"%s\\\"" % helper_path
executeCommand = 'do shell script "%s;%s;%s;%s" with administrator privileges' % (rmCommand, cpCommand, chmodCommand, chownCommand)
chmodCommand = "chmod 4755 \\\"%s\\\"" % helper_path
executeCommand = 'do shell script "%s;%s;%s;%s" with administrator privileges' % (rmCommand, cpCommand, chownCommand, chmodCommand)

xlog.info("try setup helper:%s", executeCommand)
subprocess.call(['osascript', '-e', executeCommand])
Expand Down

0 comments on commit 4aaa8df

Please sign in to comment.