Hi, > -----Original Message----- > From: Andrew Dunstan <and...@dunslane.net> > Sent: Thursday, September 9, 2021 8:30 PM
> I think I would say that we should remove any "." or ".." element in the > path except at the beginning, and in the case of ".." also remove the > preceding element, unless someone can convince me that there's a problem > with that. These WIP patches try to remove all the '.' or '..' in the path except at the beginning. 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/". But this modification will lead to a regress test failure on Windows: > -- Will fail with bad path > CREATE TABLESPACE regress_badspace LOCATION '/no/such/location'; > -ERROR: directory "/no/such/location" does not exist > +ERROR: tablespace location must be an absolute path Do you think this modification is necessary ? Rest of the modification is in 0002. I think this patch need more test and review. 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 will add this to next commitfest after further test . Regards. Shenhao Wang
0001-WIP-change-is_absolute_path-s-action.patch
Description: 0001-WIP-change-is_absolute_path-s-action.patch
0002-WIP-make-canonicalize_path-remove-all-.-in-path.patch
Description: 0002-WIP-make-canonicalize_path-remove-all-.-in-path.patch
0003-WIP-add-a-canonicalize_path-test.patch
Description: 0003-WIP-add-a-canonicalize_path-test.patch