OSDN Git Service

creator/find_file(): fix the fix in 086eeb17
authorPeter Jones <pjones@redhat.com>
Tue, 16 Aug 2016 20:31:07 +0000 (16:31 -0400)
committerPeter Jones <pjones@redhat.com>
Tue, 16 Aug 2016 20:31:54 +0000 (16:31 -0400)
086eeb17 was right about needing a continue, but it still did actually
need >= instead of !=, because it's looking for a subset.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/creator.c

index 14d446a..ca01964 100644 (file)
@@ -116,7 +116,7 @@ find_file(const char * const filepath, char **devicep, char **relpathp)
 
                if (dsb.st_rdev == fsb.st_dev) {
                        ssize_t mntlen = strlen(me->mnt_dir);
-                       if (mntlen != linklen)
+                       if (mntlen >= linklen)
                                continue;
                        if (strncmp(linkbuf, me->mnt_dir, mntlen))
                                continue;