Changeset 77

Show
Ignore:
Timestamp:
06/12/06 19:46:05 (2 years ago)
Author:
hans
Message:

ticket:44 - fixing ability to copy empty dirs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/classes/phing/tasks/system/CopyTask.php

    r59 r77  
    296296        } 
    297297        $this->buildMap($fromDir, $toDir, $files, $mapper, $this->fileCopyMap); 
     298        $this->buildMap($fromDir, $toDir, $dirs, $mapper, $this->dirCopyMap); 
    298299    } 
    299300 
     
    380381        // handle empty dirs if appropriate 
    381382        if ($this->includeEmpty) { 
    382             $e = array_keys($this->dirCopyMap); 
     383            $destdirs = array_values($this->dirCopyMap); 
    383384            $count = 0; 
    384             foreach ($e as $dir) { 
    385                 $d = new PhingFile((string) $dir); 
     385            foreach ($destdirs as $destdir) { 
     386                $d = new PhingFile((string) $destdir); 
    386387                if (!$d->exists()) { 
    387388                    if (!$d->mkdirs()) { 
  • trunk/classes/phing/tasks/system/CopyTask.php

    r43 r77  
    296296        } 
    297297        $this->buildMap($fromDir, $toDir, $files, $mapper, $this->fileCopyMap); 
     298        $this->buildMap($fromDir, $toDir, $dirs, $mapper, $this->dirCopyMap); 
    298299    } 
    299300 
     
    380381        // handle empty dirs if appropriate 
    381382        if ($this->includeEmpty) { 
    382             $e = array_keys($this->dirCopyMap); 
     383            $destdirs = array_values($this->dirCopyMap); 
    383384            $count = 0; 
    384             foreach ($e as $dir) { 
    385                 $d = new PhingFile((string) $dir); 
     385            foreach ($destdirs as $destdir) { 
     386                $d = new PhingFile((string) $destdir); 
    386387                if (!$d->exists()) { 
    387388                    if (!$d->mkdirs()) {