Actually checking that files exist before saying they do.

This commit is contained in:
Mark Story 2011-06-21 10:44:42 -07:00
parent b722693102
commit c1e674f9c1

View file

@ -613,7 +613,8 @@ class Shell extends Object {
$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));