diff options
author | Joe Orton <jorton@apache.org> | 2019-08-28 07:07:18 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2019-08-28 07:07:18 +0000 |
commit | 4652187ac662508908a05490fc590ea7c7d9f8fc (patch) | |
tree | 884da0fe08b25eebb60b8379285fbd6aa4b905e5 /file_io/os2 | |
parent | a1e6225e65054e86efd1908f9d4470e7d033783b (diff) | |
download | apr-4652187ac662508908a05490fc590ea7c7d9f8fc.tar.gz |
Revert r1862435, r1862071 per veto from ivan
msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2')
-rw-r--r-- | file_io/os2/dir.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/file_io/os2/dir.c b/file_io/os2/dir.c index c26f39d1f..f1554b6f3 100644 --- a/file_io/os2/dir.c +++ b/file_io/os2/dir.c @@ -79,28 +79,24 @@ APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir) return APR_FROM_OS_ERROR(rv); } + + APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, apr_dir_t *thedir) { - return apr_dir_pread(finfo, wanted, thedir, thedir->pool); -} - -APR_DECLARE(apr_status_t) apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted, - apr_dir_t *thedir, apr_pool_t *pool) -{ int rv; ULONG entries = 1; if (thedir->handle == 0) { thedir->handle = HDIR_CREATE; - rv = DosFindFirst(apr_pstrcat(pool, thedir->dirname, "/*", NULL), &thedir->handle, + rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle, FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY, &thedir->entry, sizeof(thedir->entry), &entries, FIL_STANDARD); } else { rv = DosFindNext(thedir->handle, &thedir->entry, sizeof(thedir->entry), &entries); } - finfo->pool = pool; + finfo->pool = thedir->pool; finfo->fname = NULL; finfo->valid = 0; @@ -122,7 +118,7 @@ APR_DECLARE(apr_status_t) apr_dir_pread(apr_finfo_t *finfo, apr_int32_t wanted, apr_os2_time_to_apr_time(&finfo->ctime, thedir->entry.fdateCreation, thedir->entry.ftimeCreation); - finfo->name = apr_pstrdup(pool, thedir->entry.achName); + finfo->name = thedir->entry.achName; finfo->valid = APR_FINFO_NAME | APR_FINFO_MTIME | APR_FINFO_ATIME | APR_FINFO_CTIME | APR_FINFO_TYPE | APR_FINFO_SIZE | APR_FINFO_CSIZE; |