util-lib: rename CHASE_NON_EXISTING → CHASE_NONEXISTENT
As suggested by @keszybz
This commit is contained in:
+2
-2
@@ -711,10 +711,10 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
if (child < 0) {
|
||||
|
||||
if (errno == ENOENT &&
|
||||
(flags & CHASE_NON_EXISTING) &&
|
||||
(flags & CHASE_NONEXISTENT) &&
|
||||
(isempty(todo) || path_is_safe(todo))) {
|
||||
|
||||
/* If CHASE_NON_EXISTING is set, and the path does not exist, then that's OK, return
|
||||
/* If CHASE_NONEXISTENT is set, and the path does not exist, then that's OK, return
|
||||
* what we got so far. But don't allow this if the remaining path contains "../ or "./"
|
||||
* or something else weird. */
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ int inotify_add_watch_fd(int fd, int what, uint32_t mask);
|
||||
|
||||
enum {
|
||||
CHASE_PREFIX_ROOT = 1, /* If set, the specified path will be prefixed by the specified root before beginning the iteration */
|
||||
CHASE_NON_EXISTING = 2, /* If set, it's OK if the path doesn't actually exist. */
|
||||
CHASE_NONEXISTENT = 2, /* If set, it's OK if the path doesn't actually exist. */
|
||||
};
|
||||
|
||||
int chase_symlinks(const char *path_with_prefix, const char *root, unsigned flags, char **ret);
|
||||
|
||||
Reference in New Issue
Block a user