When matching blocking_applications against running processes, do not match executables inside a bundle, but not in Contents/MacOS.

This commit is contained in:
Greg Neagle
2012-06-25 15:00:48 -07:00
parent 01a78cf732
commit cc0ac78964
3 changed files with 5 additions and 5 deletions

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.5.0</string>
<string>3.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@@ -425,7 +425,7 @@ def getRunningBlockingApps(appnames):
if appname.endswith('.app'):
# search by filename
matching_items = [item for item in proc_list
if '/'+ appname + '/' in item]
if '/'+ appname + '/Contents/MacOS/' in item]
else:
# check executable name
matching_items = [item for item in proc_list
@@ -434,7 +434,7 @@ def getRunningBlockingApps(appnames):
if not matching_items:
# try adding '.app' to the name and check again
matching_items = [item for item in proc_list
if '/' + appname + '.app/' in item]
if '/' + appname + '.app/Contents/MacOS/' in item]
matching_items = set(matching_items)
for path in matching_items: