Changeset 27491

Show
Ignore:
Timestamp:
28.05.2013 11:33:26 (6 years ago)
Author:
jmt12
Message:

Repairing three bugs in makeAllDirectories - incorrect pattern meant paths without protocols never created, sanitizing the path did nothing, and a use of -e where I should be being directoryExists()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils.pm

    r27481 r27491  
    409409  # use / for the directory separator, remove duplicate and 
    410410  # trailing slashes 
    411   &sanitizePath($raw_dir); 
     411  $raw_dir = &sanitizePath($raw_dir); 
    412412  # ensure the directory doesn't already exist 
    413413  if (&directoryExists($raw_dir)) 
     
    415415    return 0; 
    416416  } 
    417   if ($raw_dir =~ /^(.+?:\/\/)(.*)/) 
     417  if ($raw_dir =~ /^(.+?:\/\/)?(.*)/) 
    418418  { 
    419419    my $dirsofar = ''; 
     
    430430      $dirsofar .= $dirname; 
    431431      next if $dirname =~ /^(|[a-z]:)$/i; 
    432       if (!-e $dirsofar) 
     432      if (!&directoryExists($dirsofar)) 
    433433      { 
    434434        my $mkdir_ok = &makeDirectory($dirsofar);