Files
vectorcraft/crates/js
dotCooCoo 2894c60473 Scripts: XMP packets are checked as they are read and written, and safe closes use a temporary file
- closeFile with XMPConst.CLOSE_UPDATE_SAFELY passes the flag to xmpWrite, which then writes only
  through a temporary file; where none may be made it throws and leaves the sidecar and the packet
  as they are.
- On Unix the temporary file is created with mode 0600 and takes the sidecar's permission bits
  after the packet is written.
- canPutXMP and putXMP check again that the file is open for update after converting the packet
  argument, since a toString may close it.
- Path arguments are converted once, so a toString that changes between calls cannot mix two
  paths.
- setLocalizedText moves an existing x-default item to the front.
- A second ExternalObject install is refused and keeps the registered namespaces.
- Text beside rdf:Description elements or their properties makes a packet malformed.
- Properties read from a packet share one copy of each namespace URI, and reading stops once the
  properties exceed the script heap.
- A value with qualifiers in the rdf:value form gives the text and options of its rdf:value, and
  an empty property element whose attributes are fields is a structure.
- serialize() and reading refuse a value that would be written with more than 1,024 attributes or
  namespace declarations in scope at one element.
- find_packet treats packet markers inside CDATA sections and comments as text, and passes over a
  packet that is not UTF-8 for the next one. A section that holds a trailer and then a start does
  not hide that start, and each marker search starts where the last one stopped, so the scan
  reads the bytes about once.
- An rdf:Alt item with xml:lang="" has no language, so its array is not a language alternative;
  the empty attribute is written back as it was.
- The rdf:about value counts toward the parse budget, also in a packet with no properties.
- docs/mcp.md says that the prefix limit applies to a namespace being registered.
- The round-trip property test generates valid packets, the retry test closes the same XMPFile
  again after a failed write, and the heap-limit test requires a heap-limit error and a change
  that goes through.
2026-11-22 13:40:36 -08:00
..