diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2002-04-22 21:22:21 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2002-04-22 21:22:21 +0000 |
commit | 9ed697fc8e156522714a4123484ad47a4c0c3e86 (patch) | |
tree | b02a8d3046ae5d3a4548caedb57fbef4c9af4473 /file_io | |
parent | bc8bcc3c8af41849d00d4a8f0a39aca78984237d (diff) | |
download | libapr-9ed697fc8e156522714a4123484ad47a4c0c3e86.tar.gz |
Implemented the case matching to disk of the file and directory names.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63296 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/netware/filestat.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c index 6a54ae2f5..d6d788e81 100644 --- a/file_io/netware/filestat.c +++ b/file_io/netware/filestat.c @@ -53,6 +53,7 @@ */ #include "fileio.h" +#include "nks/dirio.h" #include "apr_file_io.h" #include "apr_general.h" #include "apr_strings.h" @@ -108,7 +109,29 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info, char *case_filename(apr_pool_t *pPool, const char *szFile) { - return (char*)szFile; + char *casedFileName = NULL; +#ifdef WAIT_TO_IMPLEMENT + char buf[1024]; + NXDirAttrWithName_t *attrBuf; + int rc; + + attrBuf = (NXDirAttrWithName_t *) &buf; + rc =NXGetAttr(NULL, szFile, NX_DELEVEL_NAME_ONLY, attrBuf, 1024, 0); + if (rc == 0) { + casedFileName = apr_pstrdup(pPool, attrBuf->deName); + } + else +#endif + { + char *s; + s = strrchr(szFile, '/'); + if (!s) + s = strrchr(szFile, ':'); + if (s) { + casedFileName = apr_pstrdup(pPool, &s[1]); + } + } + return casedFileName; } @@ -303,9 +326,9 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, if (wanted & APR_FINFO_LINK) wanted &= ~APR_FINFO_LINK; if (wanted & APR_FINFO_NAME) { - s = strrchr(case_filename(pool, fname), '/'); + s = case_filename(pool, fname); if (s) { - finfo->name = apr_pstrdup(pool, &s[1]); + finfo->name = s; finfo->valid |= APR_FINFO_NAME; } } |