don't try to create paths if we are deactivating
[p5sagit/local-lib.git] / lib / local / lib.pm
index 34e5806..5741fa1 100644 (file)
@@ -3,14 +3,13 @@ use warnings;
 
 package local::lib;
 
-use 5.008001; # probably works with earlier versions but I'm not supporting them
-              # (patches would, of course, be welcome)
+use 5.006;
 
 use File::Spec ();
 use File::Path ();
 use Config;
 
-our $VERSION = '1.008_025'; # 1.8.25
+our $VERSION = '1.008026'; # 1.8.26
 $VERSION = eval $VERSION;
 
 our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all);
@@ -209,7 +208,8 @@ sub setup_local_lib_for {
   my $interpolate = LITERAL_ENV;
   my @active_lls = $class->active_paths;
 
-  $class->ensure_dir_structure_for($path);
+  $class->ensure_dir_structure_for($path)
+    unless $deactivating;
 
   # On Win32 directories often contain spaces. But some parts of the CPAN
   # toolchain don't like that. To avoid this, GetShortPathName() gives us