Ignore:
Timestamp:
2013-05-28T11:33:26+12:00 (11 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()

File:
1 edited

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);
Note: See TracChangeset for help on using the changeset viewer.