Fixed getPackagePrefix() method (fixes a bug on Windows platforms)

This commit is contained in:
William DURAND 2011-12-05 23:12:56 +01:00
parent 667ca20b80
commit a7ed277e78

View file

@ -63,7 +63,7 @@ abstract class AbstractPropelCommand extends ContainerAwareCommand
$parts = explode(DIRECTORY_SEPARATOR, realpath($bundle->getPath()));
$length = count(explode('\\', $bundle->getNamespace())) * (-1);
$prefix = implode(DIRECTORY_SEPARATOR, array_slice($parts, 1, $length));
$prefix = implode(DIRECTORY_SEPARATOR, array_slice($parts, 0, $length));
$prefix = ltrim(str_replace($baseDirectory, '', $prefix), DIRECTORY_SEPARATOR);
if (!empty($prefix)) {