Review: Needs Fixing diff, testing

Diff is mostly looking good. Passing a non-existing directory to the fixed code 
(see diff) worked fine.

Diff comments:

> === modified file 'src/wlapplication.cc'
> --- src/wlapplication.cc      2018-07-07 19:20:22 +0000
> +++ src/wlapplication.cc      2018-07-15 09:26:31 +0000
> @@ -157,7 +157,9 @@
>       // 
> http://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
>       char* rp = realpath(path.c_str(), buffer);
>       log("Realpath: %s\n", rp);
> -     assert(rp);
> +     if (!rp); {

You might want to remove the semicolon here...

> +             throw wexception("Unable to get absolute path for %s", 
> path.c_str());
> +     }
>       return std::string(rp);
>  #else
>       return path;


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1703833-catch-missing-datadir/+merge/349629
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1703833-catch-missing-datadir.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to