Skip to content

Commit

Permalink
Changed Preview application path so that it is no longer static
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jun 11, 2019
1 parent a986fed commit 1ecabd8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/PIL/ImageShow.py
Expand Up @@ -128,7 +128,7 @@ class MacViewer(Viewer):
def get_command(self, file, **options):
# on darwin open returns immediately resulting in the temp
# file removal while app is opening
command = "open -a /Applications/Preview.app"
command = "open -a Preview.app"
command = "(%s %s; sleep 20; rm -f %s)&" % (
command,
quote(file),
Expand All @@ -143,12 +143,7 @@ def show_file(self, file, **options):
f.write(file)
with open(path, "r") as f:
subprocess.Popen(
[
"im=$(cat);"
"open -a /Applications/Preview.app $im;"
"sleep 20;"
"rm -f $im"
],
["im=$(cat); open -a Preview.app $im; sleep 20; rm -f $im"],
shell=True,
stdin=f,
)
Expand Down

0 comments on commit 1ecabd8

Please sign in to comment.