Sticky
P: jsx document.save() fails if document has no changes
When I try to save current document with jsx, the document.save(); operation fails in case of there is no changes in the document. The error message is following: "Could not complete the Save command because of a program error".
Test code (you need to create "C:\Test\" directory first)
var newDoc = app.documents.add();
newDoc.saveAs(new File("C:\\test\\1.psd"));
//newDoc.artLayers.add(); //uncomment to prevent error
newDoc.save(); //will fail
In the previous versions of Photoshop you can call Save for any documents with or without changes without any errors.
Environment
- Adobe Photoshop Version: 24.1.0 20221206.r.166 be4691b x64
- Operating System: Windows 11 64-bit 10.0.22000.1335
