Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Actually checking that files exist before saying they do.
  • Loading branch information
markstory committed Jun 21, 2011
1 parent b722693 commit c1e674f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cake/Console/Shell.php
Expand Up @@ -613,7 +613,8 @@ public function createFile($path, $contents) {
$this->out(__d('cake_console', 'Creating file %s', $path));
}

if ($File = new File($path, true)) {
$File = new File($path, true);
if ($File->exists()) {
$data = $File->prepare($contents);
$File->write($data);
$this->out(__d('cake_console', '<success>Wrote</success> `%s`', $path));
Expand Down

0 comments on commit c1e674f

Please sign in to comment.