Fix unwanted pipe release (Fix #760)

# Conflicts:
#	CHANGELOG.md
#	CotEditor/Sources/UnixScript.swift
This commit is contained in:
1024jp 2018-01-18 12:42:26 +09:00
parent d763b60fa6
commit a735768d1a
2 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,15 @@
Change Log
==========================
3.2.8
--------------------------
### Fixes
- Fix an issue where CotEditor occasionally failed sending the standard input to a UNIX script launched from the Script menu.
3.2.7 (212)
--------------------------

View File

@ -10,7 +10,7 @@
------------------------------------------------------------------------------
© 2004-2007 nakamuxu
© 2014-2017 1024jp
© 2014-2018 1024jp
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -442,6 +442,9 @@ final class ShellScript: Script {
handle.write(chunk)
}
handle.closeFile()
// inPipe must avoid releasing before `writeabilityHandler` is invocated
inPipe.fileHandleForWriting.writeabilityHandler = nil
}
}