diff options
author | Florian Zumbiehl <florz@florz.de> | 2009-08-29 16:50:43 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-08-29 16:50:43 +0200 |
commit | b0de6a63270998662cc069cc2ca1579776bb28df (patch) | |
tree | e4f5903ea0b8921e2ec6c72337b97e010dbc7ca8 /libudev | |
parent | 28da1a6186fcb55762b1649c6dd1e43545e0eb9a (diff) |
util_delete_path(): handle multiple leading slashes
Diffstat (limited to 'libudev')
-rw-r--r-- | libudev/libudev-util-private.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index c86567159e..042b711928 100644 --- a/libudev/libudev-util-private.c +++ b/libudev/libudev-util-private.c @@ -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) |