Permalink
Browse files

making sure the default namespace used in Library::extract() is valid…

… by underscoring the directory name
  • Loading branch information...
1 parent 6348782 commit 796050e098073cf10545be59f60ac565ea1eb319 @ppadron ppadron committed Jul 4, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 console/command/Library.php
@@ -13,6 +13,7 @@
use RuntimeException;
use lithium\core\Libraries;
use lithium\util\String;
+use lithium\util\Inflector;
/**
* The Library command is used to archive and extract Phar::GZ archives. Requires zlib extension.
@@ -237,7 +238,7 @@ public function extract($name = 'new', $result = null) {
$this->out(basename($to) . " created in " . dirname($to) . " from {$from}");
if (empty($this->namespace)) {
- $this->namespace = basename($to);
+ $this->namespace = Inflector::underscore(basename($to));
}
$replacements = $this->_findReplacements($to);

0 comments on commit 796050e

Please sign in to comment.