path-util: drop redundant condition in path_find_last_component()

Follow-up for 3a7ba9f6b9
This commit is contained in:
Mike Yuan
2026-02-09 09:05:44 +01:00
parent 3788ec1b4a
commit 294855953c
+1 -2
View File
@@ -1027,8 +1027,7 @@ int path_find_last_component(const char *path, bool accept_dot_dot, const char *
q = path + strlen(path) - 1;
q = skip_slash_or_dot_backward(path, q);
if (!q || /* the root directory */
(q == path && *q == '.')) { /* path is "." or "./" */
if (!q) { /* the root directory, "." or "./" */
if (next)
*next = path;
if (ret)