Skip to content

Commit

Permalink
Improve extract in debug mode to auto-create the folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Jun 24, 2015
1 parent 1422d39 commit d84f99e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Shell/Task/ExtractTask.php
Expand Up @@ -16,6 +16,7 @@

use Cake\Console\Shell;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Filesystem\File;
use Cake\Filesystem\Folder;
Expand Down Expand Up @@ -704,6 +705,9 @@ protected function _isExtractingApp()
*/
protected function _isPathUsable($path)
{
if (Configure::read('debug') && !is_dir($path)) {
mkdir($path, 0770, true);
}
return is_dir($path) && is_writable($path);
}
}

0 comments on commit d84f99e

Please sign in to comment.