tools/ccanlint: don't assert on relative directories for -d.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 26 May 2014 02:40:47 +0000 (12:10 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 27 May 2014 03:49:09 +0000 (13:19 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/ccanlint/ccanlint.c

index 89e0b5c61237751d8fbd6a85c2987694d3a1d02e..158195cbdef04adf4c6ca1323ccc68c3862b1f1b 100644 (file)
@@ -679,7 +679,7 @@ int main(int argc, char *argv[])
        if (argc == 1)
                dir = cwd;
        else
        if (argc == 1)
                dir = cwd;
        else
-               dir = path_join(NULL, cwd, argv[1]);
+               dir = path_simplify(NULL, take(path_join(NULL, cwd, argv[1])));
 
        ccan_dir = find_ccan_dir(dir);
        if (!ccan_dir)
 
        ccan_dir = find_ccan_dir(dir);
        if (!ccan_dir)