mirror of
https://github.com/systemd/systemd.git
synced 2025-03-29 06:50:16 +03:00
util_delete_path(): handle multiple leading slashes
This commit is contained in:
parent
28da1a6186
commit
b0de6a6327
@ -64,6 +64,9 @@ int util_delete_path(struct udev *udev, const char *path)
|
||||
char *pos;
|
||||
int retval;
|
||||
|
||||
if (path[0] == '/')
|
||||
while(path[1] == '/')
|
||||
path++;
|
||||
util_strscpy(p, sizeof(p), path);
|
||||
pos = strrchr(p, '/');
|
||||
if (pos == p || pos == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user