Browse files

Actually checking that files exist before saying they do.

  • Loading branch information...
1 parent b722693 commit c1e674f9c149532e09b0808f9b6f132f5bd4068e @markstory markstory committed Jun 21, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/Console/Shell.php
View
3 lib/Cake/Console/Shell.php
@@ -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));

0 comments on commit c1e674f

Please sign in to comment.