Path-mangling logic was failing to account for paths containing mentions

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b06c90764526ccf291011ecbbcab49ae9729f65a
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-08-09T20:20:47Z
Releases: 8.0.0
Path-mangling logic was failing to account for paths containing mentions
of '.' or '..'.  Extend canonicalize_path() to trim off trailing occurrences
of these things, and use it to fix up paths where needed (which I think is
only after places where we trim the last path component, but maybe some
others will turn up).  Fixes Josh's complaint that './initdb' does not
work.

Files

PathChange+/−
src/bin/initdb/initdb.c modified +2 −1
src/port/exec.c modified +4 −1
src/port/path.c modified +27 −5