summaryrefslogtreecommitdiff
path: root/source4/script/tests/SocketWrapper.pm
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-03-12 00:24:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:26 -0500
commit67e22aa6ffcdebf06324d1797989cd863fb5c0f8 (patch)
treeec378e27352a63b549923c515c8ac56d3a4c3c36 /source4/script/tests/SocketWrapper.pm
parent7b706c70915ebcb5663d7a7c15610ac4cf594440 (diff)
downloadsamba-67e22aa6ffcdebf06324d1797989cd863fb5c0f8.tar.gz
samba-67e22aa6ffcdebf06324d1797989cd863fb5c0f8.tar.bz2
samba-67e22aa6ffcdebf06324d1797989cd863fb5c0f8.zip
r21790: Setup the socket_wrapper_dir when we set the environment variable.
Andrew Bartlett (This used to be commit 5c07dbd2487c5c23355ad0e3db6e9f9caf8ce145)
Diffstat (limited to 'source4/script/tests/SocketWrapper.pm')
-rw-r--r--source4/script/tests/SocketWrapper.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/script/tests/SocketWrapper.pm b/source4/script/tests/SocketWrapper.pm
index c9edbcdf3d..d01aba829e 100644
--- a/source4/script/tests/SocketWrapper.pm
+++ b/source4/script/tests/SocketWrapper.pm
@@ -15,6 +15,14 @@ use FindBin qw($RealBin);
sub setup_dir($)
{
my ($dir) = @_;
+ if (defined($dir)) {
+ if ( -d $dir ) {
+ unlink <$dir/*>;
+ } else {
+ mkdir($dir);
+ }
+ }
+
$ENV{SOCKET_WRAPPER_DIR} = $dir;
return $dir;
}