From 993bab019d8774963d3864e297c1b8ffb57457d7 Mon Sep 17 00:00:00 2001 From: Headshotnoby Date: Fri, 25 Jun 2021 11:16:03 -0400 Subject: [PATCH] set mac resources path on options update cancel --- options.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/options.py b/options.py index 07e705e..e863d5f 100644 --- a/options.py +++ b/options.py @@ -2,6 +2,9 @@ from ConfigParser import ConfigParser from os.path import exists from os import listdir, _exit import subprocess +try: + import Cocoa # mac +except: pass from PyQt4 import QtGui, QtCore @@ -263,6 +266,8 @@ class Settings(QtGui.QDialog): if code == 0: subprocess.Popen(["./AO2XPupdat"]) _exit(0) + elif osname == "Darwin": # bundle + os.chdir(Cocoa.NSBundle.mainBundle().resourcePath()) # return to Resources folder def onReloadAudio(self): audio.free()