On Sun, Sep 12, 2021 at 07:33:23AM +0000, wangsh.f...@fujitsu.com wrote: > 0001 is a small fix, because I find that is_absolute_path is not appropriate, > see comment in skip_drive: > > * On Windows, a path may begin with "C:" or "//network/".
#define is_absolute_path(filename) \ ( \ - IS_DIR_SEP((filename)[0]) || \ + (IS_DIR_SEP((filename)[0]) && IS_DIR_SEP((filename)[1])) || \ (isalpha((unsigned char) ((filename)[0])) && (filename)[1] == ':' && \ IS_DIR_SEP((filename)[2])) \ With this change you would consider a path beginning with "/foo/.." as not being an absolute path, but that's not correct. Or am I missing something obvious? > 0003 is a test extension for me to check the action of canonicalize_path. > Do you think is necessary to add this test extension(and some test scripts) > to master ? > If necessary, maybe I can use the taptest to test the action of > canonicalize_path > in Linux and Windows. I am not sure that this is worth the cycles spent on, so I would discard it. This will help a lot in reviewing this patch, for sure. And you could add some regression tests to show how much testing you have done, for both WIN32 and non-WIN32. I do that from time to time, and was actually thinking to test this API this way. -- Michael
signature.asc
Description: PGP signature