2004-06-07
2004-06-07 10:25:29 by Stephen R. van den Berg <srb@cuci.nl>
-
1e416ed41b06f45d90aa15950dbef2bb72ea7eeb
(11 lines)
(+6/-5)
[
Show
| Annotate
]
Branch: ChiliMoon/2004
stat_file, not file_stat
Checks for size are really isreg checks.
Rev: server/modules/misc/pathinfo.pike:1.24
2:
inherit "module";
- constant cvs_version = "$Id: pathinfo.pike,v 1.23 2004/06/06 22:16:26 _cvs_dirix Exp $";
+ constant cvs_version = "$Id: pathinfo.pike,v 1.24 2004/06/07 10:25:29 _cvs_stephen Exp $";
constant thread_safe = 1;
#ifdef PATHINFO_DEBUG
57: Inside #if undefined(PATHINFO_LINEAR)
PATHINFO_WERR(sprintf("Trying %O...", file));
/* Note: Zapps id->not_query. */
- Stdio.Stat st = id->conf->file_stat(file, id);
+ Stdio.Stat st = id->conf->stat_file(file, id);
if (st) {
- if (st->type >= 0) {
+ if (st->isreg) {
// Found a file!
id->misc->path_info = query[offsets[probe]..];
id->not_query = file;
84:
pi = "/"+reverse( add_path_info )+pi;
id->misc->path_info = pi;
PATHINFO_WERR(sprintf("Trying: %O (%O)", query, pi));
- Stdio.Stat st = id->conf->file_stat( query, id );
- if( st && (st->size > 0))
+ Stdio.Stat st = id->conf->stat_file( query, id );
+ if( st && st->isreg)
{
id->not_query = query;
PATHINFO_WERR(sprintf("Found: %O:%O",