safe_create_leading_directories(): improve docstring

Document the difference between this function and safe_create_leading_directories_const(), and that the former restores path before returning. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>

Michael Haggerty committed Apr 24, 2016 at 04:34 UTC e95792e532bde75fd4a1e91aecfcf9a28ba23955
1 file changed +5
cache.h
+5
@@ -993,6 +993,11 @@ int adjust_shared_perm(const char *path);
993 * directory while we were working. To be robust against this kind of
994 * race, callers might want to try invoking the function again when it
995 * returns SCLD_VANISHED.
996 + *
997 + * safe_create_leading_directories() temporarily changes path while it
998 + * is working but restores it before returning.
999 + * safe_create_leading_directories_const() doesn't modify path, even
1000 + * temporarily.
1001 */
1002 enum scld_error {
1003 SCLD_OK = 0,