Introduce new function real_path_if_valid()
The function is like real_path(), except that it returns NULL on error instead of dying. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:

committed by
Jeff King

parent
d6052abca3
commit
e3e46cdbd4
1
cache.h
1
cache.h
@ -714,6 +714,7 @@ static inline int is_absolute_path(const char *path)
|
||||
}
|
||||
int is_directory(const char *);
|
||||
const char *real_path(const char *path);
|
||||
const char *real_path_if_valid(const char *path);
|
||||
const char *absolute_path(const char *path);
|
||||
const char *relative_path(const char *abs, const char *base);
|
||||
int normalize_path_copy(char *dst, const char *src);
|
||||
|
Reference in New Issue
Block a user