Merge pull request #23946 from poettering/tmpfiles-extrat-dir-fn
tmpfiles: port from basename()/dirname() → path_extract_direcory()/path_extract_filename()
This commit is contained in:
@@ -43,12 +43,16 @@
|
||||
#endif
|
||||
|
||||
static inline bool is_path(const char *p) {
|
||||
assert(p);
|
||||
if (!p) /* A NULL pointer is definitely not a path */
|
||||
return false;
|
||||
|
||||
return strchr(p, '/');
|
||||
}
|
||||
|
||||
static inline bool path_is_absolute(const char *p) {
|
||||
assert(p);
|
||||
if (!p) /* A NULL pointer is definitely not an absolute path */
|
||||
return false;
|
||||
|
||||
return p[0] == '/';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user