chiark / gitweb /
path-util: do not fail in path_is_mountpoint() if path doesn't exist
authorMantas Mikul─Śnas <grawity@gmail.com>
Sun, 9 Sep 2012 12:16:18 +0000 (15:16 +0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Sep 2012 07:21:10 +0000 (09:21 +0200)
This was accidentally lost in commit 1640a0b6b05b.

src/shared/path-util.c

index 39f77f6..97a2005 100644 (file)
@@ -387,8 +387,12 @@ fallback:
         else
                 r = lstat(t, &a);
 
-        if (r < 0)
+        if (r < 0) {
+                if (errno == ENOENT)
+                        return 0;
+
                 return -errno;
+        }
 
         r = path_get_parent(t, &parent);
         if (r < 0)