Another AppleScript Tidbit

When intentionally generating an error in AppleScript you can supply the error message and number (and probably the other parameters, if you care about them). If this error is not trapped by a try handler, it is passed back to the caller.

What I discovered today is this: if you generate an error and give it error number 0, Script Debugger does not report the error in its standard error sheet. (AppleScript Editor does report the error.)

I’m not sure if this is an intentional bit of niceness — it gives you a way of stopping the script without being bothered by a dialog — or a mistake based on the fact that, in Cocoa, et. al. “error 0” means noErr.

google_pluslinkedingoogle_pluslinkedinby feather

OS X Server Quota configuration bug

In the Mountain Lion Server User configuration panel, you can set a disk quota for each user. Be warned that setting a “really large” quota (500GB in my test) can cause quota errors. I don’t know whether the value is setting a high bit and ‘going negative’ or overflowing some variable so it wraps around to a small value, but there it is.

google_pluslinkedingoogle_pluslinkedinby feather

Fixing Time Machine Skippage

Time Machine has been skipping some folders on my work machine, and every simple trick I tried failed to make it back them up. Finally, I dug deep and found the problem: the OS X Extended Attributes for those folders contained this attribute:com.apple.metadata:com_apple_backup_excludeItem
The problem here is that these folders are part of an Xcode project, and it seems that Xcode is tagging them for exclusion. Not nice.
The “how to remove this” instructions came from stackoverflow.com.
The salient bit from that article is this:

Use the xattr command. You can inspect the extended attributes:

$ xattr s.7z
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine

and use the -d option to delete one extended attribute:

$ xattr -d com.apple.quarantine s.7z
$ xattr s.7z
com.apple.metadata:kMDItemWhereFroms
google_pluslinkedingoogle_pluslinkedinby feather

Fixing Time Machine Skippage

Time Machine has been skipping some folders, and every simple trick I tried failed to make it back them up. Finally, I dug deep and found the problem: the OS X Extended Attributes for those folders contained this attribute: com.apple.metadata:com_apple_backup_excludeItem

The “how to remove this” instructions came from stackoverflow.com.

google_pluslinkedingoogle_pluslinkedinby feather