On Thu, Mar 26, 2015 at 04:04:14PM -0700, Steve Beattie wrote:
> it didn't ever create the directory. But in the future, we expect the
> function to go ahead and create the new cache subdirectory. So it seems
> like "create" or "init" would work for the function name, perhaps the
> latter since it also makes it valid by creating the .features file,
> which would still cover the existing situation.
> 
> (Or possibly have two functions a _reset and an _init, where the
> latter creates the directory and calls the former. But I'm not
> convinced that's necessary.)

It'd be nice if there was one method that would idempotently do the right
thing; if we've got an _init and a _reset then there's a chance that
there's a race condition in clients of the api between determining which
method ought to be used and actually using one of them,

Of course the only names that come to mind are "mkdir -p", _idem, and
other horrible things. _create feels least bad, at least if it will
actually create the directory if needed.

Thanks

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to