Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
Fixes for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed May 2, 2017
1 parent ca96c1d commit 95b3cb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Console/ModulePublish.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class ModulePublish extends Command
*/
public function fire()
{
if (is_dir(base_path(Config::get('quarx.module-directory')).'/'.ucfirst($this->argument('module')).'/Publishes')) {
if (is_dir(base_path(Config::get('quarx.module-directory')).DIRECTORY_SEPARATOR.ucfirst($this->argument('module')).DIRECTORY_SEPARATOR.'Publishes')) {
$fileSystem = new Filesystem();

$files = $fileSystem->allFiles(base_path(Config::get('quarx.module-directory')).'/'.ucfirst($this->argument('module')).'/Publishes');
$files = $fileSystem->allFiles(base_path(Config::get('quarx.module-directory')).DIRECTORY_SEPARATOR.ucfirst($this->argument('module')).DIRECTORY_SEPARATOR.'Publishes');
$this->line("\n");
foreach ($files as $file) {
if ($file->getType() == 'file') {
$this->line(str_replace(base_path(Config::get('quarx.module-directory')).'/'.ucfirst($this->argument('module')).'/Publishes/', '', $file));
$this->line(str_replace(base_path(Config::get('quarx.module-directory')).DIRECTORY_SEPARATOR.ucfirst($this->argument('module')).DIRECTORY_SEPARATOR.'Publishes'.DIRECTORY_SEPARATOR, '', $file));
}
}

Expand All @@ -47,9 +47,9 @@ public function fire()

if ($result) {
foreach ($files as $file) {
$newFileName = str_replace(base_path('quarx/modules/'.ucfirst($this->argument('module')).'/Publishes/'), '', $file);
if (strstr($newFileName, 'resources/themes/')) {
$newFileName = str_replace('/default/', '/'.Config::get('quarx.frontend-theme').'/', $newFileName);
$newFileName = str_replace(base_path(Config::get('quarx.module-directory').DIRECTORY_SEPARATOR.ucfirst($this->argument('module')).DIRECTORY_SEPARATOR.'Publishes'.DIRECTORY_SEPARATOR), '', $file);
if (strstr($newFileName, 'resources'.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR)) {
$newFileName = str_replace(DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR.Config::get('quarx.frontend-theme').DIRECTORY_SEPARATOR, $newFileName);
$this->line('Copying '.$newFileName.' using current Quarx theme...');
} else {
$this->line('Copying '.$newFileName.'...');
Expand Down

0 comments on commit 95b3cb2

Please sign in to comment.