mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-15 20:06:28 +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):
|
def get_command(self, file, **options):
|
||||||
# on darwin open returns immediately resulting in the temp
|
# on darwin open returns immediately resulting in the temp
|
||||||
# file removal while app is opening
|
# 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 = "(%s %s; sleep 20; rm -f %s)&" % (
|
||||||
command,
|
command,
|
||||||
quote(file),
|
quote(file),
|
||||||
|
@ -143,12 +143,7 @@ elif sys.platform == "darwin":
|
||||||
f.write(file)
|
f.write(file)
|
||||||
with open(path, "r") as f:
|
with open(path, "r") as f:
|
||||||
subprocess.Popen(
|
subprocess.Popen(
|
||||||
[
|
["im=$(cat); open -a Preview.app $im; sleep 20; rm -f $im"],
|
||||||
"im=$(cat);"
|
|
||||||
"open -a /Applications/Preview.app $im;"
|
|
||||||
"sleep 20;"
|
|
||||||
"rm -f $im"
|
|
||||||
],
|
|
||||||
shell=True,
|
shell=True,
|
||||||
stdin=f,
|
stdin=f,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user