mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-23 10:53:35 +01:00
script.check reported file.write and filesWritten when a script set length, hidden or readonly on a Folder object as well as on a File object. It now leaves out only objects that are Folder objects whatever the path names: new Folder(...), new Folder, and the Folder places such as Folder.temp, except Folder.current, which a script can assign. Folder(...) without new gives a File object when the path names a file, and Folder.selectDialog() gives a File or Folder object, so setting those still counts. A variable counts as a Folder only when every assignment the check reads gives it one: an assignment in another branch, in a function body, or in an included file that gives it an object that may be a File object keeps it counting, and a variable assigned another variable counts as a possible File object. A File object assigned to a function's own variable or parameter, or to a catch block's parameter, ends with them. Calls such as remove() on a Folder object still count as writes. Folder object constructors and selectDialog: https://extendscript.docsforadobe.dev/file-system-access/folder-object/