From 89d835065e96a3f1cd84eb8dfa8a7ea8bfdd7a24 Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Fri, 16 Jun 2000 16:30:43 +0000 Subject: [PATCH] Prefer C:/temp in Win32 as File::Spec->tmpdir to /tmp because when run as services (Win32ese for daemons) no environment variables are set and tmpdir ends up as /tmp, which is ambiguous. Subject:[ID 20000616.002] File::Spec->tmpdir broken when running as service Message-Id: <20000616163043.26398.qmail@mail.sergeant.org> p4raw-id: //depot/cfgperl@6234 --- lib/File/Spec/Win32.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 505e578..5d3079e 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -40,6 +40,7 @@ from the following list: $ENV{TMPDIR} $ENV{TEMP} $ENV{TMP} + C:/temp /tmp / @@ -49,7 +50,7 @@ my $tmpdir; sub tmpdir { return $tmpdir if defined $tmpdir; my $self = shift; - foreach (@ENV{qw(TMPDIR TEMP TMP)}, qw(/tmp /)) { + foreach (@ENV{qw(TMPDIR TEMP TMP)}, qw(C:/temp /tmp /)) { next unless defined && -d; $tmpdir = $_; last; -- 2.7.4