[info-performer] pfdLoadFile and current directory

Date view Thread view Subject view Author view

From: John Kelso (kelso++at++nist.gov)
Date: 01/07/2005 12:25:36


Hi all,

Is there ANY way to get pfdLoadFile, which uses pfFindFile, to NOT look
first in the current directory?

Although the 3.1 Programmer's Guide doesn't mention this behavior, stating
this:

  The function pfFindFile() searches the paths in PFPATH first, then those
  given in the most recent pfFilePath() call; it returns the complete path
  name for the file if the file is found.

the pfFindFile man page gives a different story:

  The search logic used by pfFindFile is this:

  1. First the file is sought exactly as named by file. If it exists and
  passes the subsequent access test described below, then file will be
  returned in the path argument.

  2. If the file was not found or was not accessible, then each of the
  locations defined by the PFPATH environment variable are prepended to the
  file argument and tested. If it exists and passes the subsequent access
  test described below, then the complete path name will be returned in the
  path argument.

and so on..

I quick experiment seems to indicate the man page is correct.

Forcing a search to look first in the current directory seems like a real
bad design if you want consistent system behavior- there must be a way
around it. What is it?

RTFM pointers gratefully accepted,

Thanks,

-John


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jan 07 2005 - 12:25:39 PST