Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Preview application path so that it is no longer static #3896

Merged
merged 1 commit into from Jun 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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