Skip to content

Commit

Permalink
CopyDir: check for destination (remove @-operator)
Browse files Browse the repository at this point in the history
  • Loading branch information
boedah committed Feb 28, 2015
1 parent 4163278 commit 4bcc7ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Task/FileSystem/CopyDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ protected function copyDir($src, $dst)
if (false === $dir) {
throw new TaskException($this, "Cannot open source directory '" . $src . "'");
}
@mkdir($dst);
if (!is_dir($dst)) {
mkdir($dst);
}
while (false !== ($file = readdir($dir))) {
if (($file !== '.') && ($file !== '..')) {
$srcFile = $src . '/' . $file;
Expand Down

0 comments on commit 4bcc7ec

Please sign in to comment.