Bug/Enhancement Request - Allow QuickLook Preview to Pass Through iCloud


I’ve noticed that QuickLook preview often fails for me, and have just realized that this is occurring when the .scpt was generated by Script Debugger on one Mac & transferred via iCloud to another Mac.

Local QuickLook Works:

But when transferred through iCloud, all you get is this:

On closer inspection, it seems as though Script Debugger is appending the QuickLook information in the resource fork of the file (extended attribute com.apple.ResourceFork), which would explain why the information does not survive the trip through iCloud.

iCloud only syncs certain extended attributes (see Which extended attributes does iCloud preserve, and which get stripped? – The Eclectic Light Company); normally these must be suffixed with the XATTR_FLAG_SYNCABLE flag (“S” following the flag separator “#”) to pass through iCloud. The com.apple.ResourceFork unfortunately does not appear to sync.

So, my question:
Would it be possible for Script Debugger to save the QuickLook information in a different extended attribute (such as com.latenightsw.ScriptDebugger#PS), to act as a fallback if the main com.apple.ResourceFork is not present?

(On an unimportant side note, the file icon displayed in column always seems to be very low-resolution; not sure if that just needs updated).

A better solution is to use a more modern file format, like .scptd files. Duplicating stuff in extra extended attributes is just a band-aid on the whole problem of fragile metadata, and adds to file bloat.

Thanks Shane! That’s a good idea.

Just wanted to make sure this was on your radar – wasn’t sure how widely-known this limitation of iCloud sync was.

For sure. I don’t know if there’s a technical reason that Script Debugger needs to store the QuickLook info in com.apple.ResourceFork, but assumed it would be a big undertaking to move it outright to a different xattr that supports syncing.

Thank you!

It’s a historical thing — that used to be the only place. We’ve moved the stuff we store with .applescript files into their own xattrs, and I’ll make a note about looking into supporting the iCloud stuff there. But with .scpt files there’s stuff that has to be in the resource fork, such as the script description, so there’s not a lot of point of splitting stuff up.

The bottom line, though, is where files are being moved around, it’s better to use a format that doesn’t rely on xattrs at all.

1 Like