diff options
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c index 92299ed622..d1c406081e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -116,6 +116,15 @@ int safe_create_leading_directories(char *path) return 0; } +int safe_create_leading_directories_const(const char *path) +{ + /* path points to cache entries, so xstrdup before messing with it */ + char *buf = xstrdup(path); + int result = safe_create_leading_directories(buf); + free(buf); + return result; +} + char *sha1_to_hex(const unsigned char *sha1) { static int bufno; |