Adobe ExtendScript File object gotcha under OS X Lion
File this under Ultra-Niche. If you happen to be one of the three people in the world using Adobe's easy-to-use and powerful ExtendScript to script the CS*-series of tools (e.g., Photoshop) and you're using the FIle object to write out files manually, read on.
Under Snow Leopard, the following code would work (you'll find variants of this code floating around the Internets):
var cssFile = new File();
cssFile.open('w');
cssFile.write(css);
cssFile.copy(cssFilePath);
In OS X Lion, it doesn't. Instead use:
var cssFile = new File(cssFilePath);
cssFile.open('w');
cssFile.write(css);
cssFile.close();
Hope this helps the one dudette in Sweden who runs across the issue in 2013 :)
Comments
by Mitch on 2011-07-28 14:48:48
by Tom on 2012-04-18 13:55:02
by fatboy on 2012-10-27 20:54:18