Skip to content

Commit

Permalink
Fix several logic errors and a poor assumption when converting Apple …
Browse files Browse the repository at this point in the history
…update must-close attributes to blocking_applications
  • Loading branch information
gregneagle committed Mar 25, 2016
1 parent d12e481 commit 65089c0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/client/munkilib/appleupdates.py
Expand Up @@ -505,16 +505,14 @@ def GetBlockingApps(self, product_key):
for app_id in set(must_close_app_ids):
dummy_resultcode, dummy_fileref, nsurl = LSFindApplicationForInfo(
0, app_id, None, None, None)
fileurl = str(nsurl)
if fileurl.startswith('file://localhost'):
fileurl = fileurl[len('file://localhost'):]
pathname = urllib2.unquote(fileurl).rstrip('/')
if nsurl:
pathname = nsurl.fileSystemRepresentation()
dirname = os.path.dirname(pathname)
executable = munkicommon.getAppBundleExecutable(pathname)
if executable:
# path to executable should be location agnostic
executable = executable[len(dirname + '/'):]
blocking_apps.append(executable or pathname)
blocking_apps.append(executable or pathname)

return blocking_apps

Expand Down

0 comments on commit 65089c0

Please sign in to comment.