diff options
-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) |