summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2003-11-02 15:46:02 +0000
committerstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2003-11-02 15:46:02 +0000
commitaf283c870c913232262ec9b0b6d258c1d2317f81 (patch)
tree047b35b8955c5f1335d30a20faaa679443f71bb8 /file_io
parente58e87650911e76bd609e4062f33b5fdef707506 (diff)
downloadlibapr-af283c870c913232262ec9b0b6d258c1d2317f81.tar.gz
* file_io/unix/tempdir.c
(apr_temp_dir_get): If we have a cache we might aswell use it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/unix/tempdir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/file_io/unix/tempdir.c b/file_io/unix/tempdir.c
index 0b433c5ae..49b3c2e5b 100644
--- a/file_io/unix/tempdir.c
+++ b/file_io/unix/tempdir.c
@@ -91,6 +91,10 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
char *cwd;
int i;
+ /* If we have a cached temp dir, use it. */
+ if (global_temp_dir[0])
+ goto end;
+
/* Our goal is to find a temporary directory suitable for writing
into. We'll only pay the price once if we're successful -- we
cache our successful find. Here's the order in which we'll try