This can be used when the key is name spaced, e.g. `/foo/bar` or `foo.bar`. Here we can erase everything under foo by using `/foo/` or `foo.` respectively.
This was previously done because the function wasn’t available until 10.7, but since that is (now) our deployment target, there is no need to wrap the call.
This makes the abstraction redundant and it should be removed. I am doing that as a multi-step process, since the previous implementation was blocking tests from being updated to the new (dispatch queue based) test system.
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.
E.g. reading “int const* const” from right to left we get “const pointer to const integer”.
This is mainly because the SOMAXCONN constant looks better (in the source) than some arbitrarily chosen number. The constant is presently defined as 128 so it doesn’t seem wasteful, and presumably the queue will only take up space if we are not actually responding to socket connections.
The mutex was locked to ensure that the client object did not go away, but the client’s code may terminate the program which destroys the server_t instance and thereby the mutex itself, which would previously cause an assertion to trigger, since the mutex was locked during destruction.
In practice there is no issue with the mutex not being locked while accessing the client object, as “unregister_client” and “master_run” are both called from the main thread, except for tests, but here we do not unregister client objects before their requests have been handled.
The “proper” replacement for this API is to use the ServiceManagement framework’s SMJobBless() to bless our helper tool. In two of the three use-cases our helper tool is however regular shell commands, so it seems redundant to wrap these shell tools as helper tools we can install as launchd jobs.
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.
Since we delete the jailed directory in the destructor we can’t support a deep copy of this type. Since we don’t need it, and it’s just a type used in tests, I opted for simply disabling this (to get a compiler error, should it be attempted) rather than introduce the necessary code to allow shallow copies.
Preview can now be initiated with multiple items and while the preview panel is showing, one can use arrow up/down to switch to other items (in the file browser).