mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Merge pull request #3896 from radarhere/preview
Changed Preview application path so that it is no longer static
This commit is contained in:
commit
7f86ed1e52
|
@ -128,7 +128,7 @@ elif sys.platform == "darwin":
|
|||
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),
|
||||
|
@ -143,12 +143,7 @@ elif sys.platform == "darwin":
|
|||
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,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user