On Apr 29, 2025, at 09:49, Matheus Alcantara <matheusssil...@gmail.com> wrote:
> Yes, it is a single path from the search path, in your case it will be > "/Users/david/Downloads/share/postgresql" and "$system". We split these > paths based on the system path separator and get the next "piece" here: > > char *piece = first_path_var_separator(ecp); > > The first_path_var_separator() changes the "ecp" parameter on every call, > it returns the next path on "ecp" and changes it to have the remaining > paths to iterate over it. Right. My point is a minor one, but I thin you can use an if/ else there: ```c if (strcmp(piece, "$system") == 0) { /* Substitute the path macro if needed */ mangled = substitute_path_macro(piece, "$system", system_dir); } else { /* * Append "extension" suffix in case is a custom extension * control path. */ mangled = psprintf("%s/extension", mangled); } ``` Best, David
signature.asc
Description: Message signed with OpenPGP