pgsql: Fix make_relative_path() to support cases where target_path and

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix make_relative_path() to support cases where target_path and
Date: 2005-12-23 22:34:27
Message-ID: 20051223223427.712059DC865@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix make_relative_path() to support cases where target_path and bin_path
differ by more than the last directory component. Instead of insisting
that they match up to the last component, accept whatever common prefix
they have, and try to replace the non-matching part of bin_path with
the non-matching part of target_path in the actual executable's path.
In one way this is tighter than the old code, because it insists on
a match to the part of bin_path we want to substitute for, rather than
blindly stripping one directory component from the executable's path.
Per gripe from Martin Pitt and subsequent discussion.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/port:
path.c (r1.61.2.1 -> r1.61.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/port/path.c.diff?r1=1.61.2.1&r2=1.61.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-12-23 22:34:33 pgsql: Fix make_relative_path() to support cases where target_path and
Previous Message Tom Lane 2005-12-23 22:34:23 pgsql: Fix make_relative_path() to support cases where target_path and