Skip to main content.
home | support | download

Back to List Archive

Re: FileFilter '%p' does not give FULL path to filename

From: Greg Fenton <greg_fenton(at)>
Date: Thu Oct 10 2002 - 19:02:47 GMT
--- Bill Moseley <> wrote:
> At 04:47 PM 10/09/02 -0700, Greg Fenton wrote:
> >
> >I need the full path to the temporary file.
> >'%p' gives "./as8f4y75"
> That is the path to the temporary file (although that's doesn't look
> like a temporary file generated by swish).

This is not the FULL path as indicated by the docs.  It is a relative
path.  The docs should reflect this.

The example that is given in the docs (FileFilter description) is:
    %p = "/tmp/tmp.1234.mydoc.txt"
but there is no mention of the fact that this is because TEMP is set.

> > export TEMP=/tmp
> '/tmp/swtmpfltrH0fva4'
> 'http://localhost/index.html'
> >'%f' gives "as8f4y75"
> >'%d' gives "./"   (not very useful in my opinion).
> It's useful if your filter needs to know just the directory name. 
> Not sure why a filter might need that, but it's there just in case.

My point is that "./" is not very useful information.  I would think
that the value of '%d' should be `pwd` instead of "./".  If someone
ever wanted to use this value, then what good is "./" to them?  What
good is "./foo" as a value for '%p'? 

IMO, under all circumstances %p should be the full absolute path to the
temp file, %d should be the full absolute path to the parent dir of the
temp file, and %f should be the basename of the temp file.  I don't
believe that the current behaviour makes much sense (though I'd be
happy to hear otherwise).

Thank you for clarifying the TEMP situation.  Again, I believe that at
the very least the docs should be updated to reflect this information.

BTW: the filter I am using creates its own temporary directory and
chdir()'s to that, so "./as8f4y75" is not useful to it.  I will set
TEMP and hopefully this resolves the issue.

For people who might be learning from this email (future Googlers),
check out the description of the TmpDir configuration directive.

Thanks again,

Greg Fenton

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
Received on Thu Oct 10 19:06:46 2002