diff --git a/bin/teleport.php b/bin/teleport.php index eb61761..4195b9c 100644 --- a/bin/teleport.php +++ b/bin/teleport.php @@ -42,7 +42,7 @@ try { require_once __DIR__ . '/../src/bootstrap.php'; - define('TELEPORT_BASE_PATH', rtrim(getcwd(), '/') . '/'); + define('TELEPORT_BASE_PATH', rtrim(getcwd(), '/') . DIRECTORY_SEPARATOR); $options = array( 'debug' => $debug diff --git a/src/Teleport/Action/Extract.php b/src/Teleport/Action/Extract.php index 66d1bff..2e61ac9 100644 --- a/src/Teleport/Action/Extract.php +++ b/src/Teleport/Action/Extract.php @@ -144,7 +144,7 @@ protected function createPackage($name, $version, $release = '') $filename = $signature . '.transport.zip'; /* remove the package if it's already been made */ - $directory = TELEPORT_BASE_PATH . 'workspace/'; + $directory = TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR; if (file_exists($directory . $filename)) { unlink($directory . $filename); } diff --git a/src/Teleport/Action/Inject.php b/src/Teleport/Action/Inject.php index 61d4f66..e29d4f3 100644 --- a/src/Teleport/Action/Inject.php +++ b/src/Teleport/Action/Inject.php @@ -54,17 +54,17 @@ public function process() $this->modx->loadClass('transport.xPDOFileVehicle', XPDO_CORE_PATH, true, true); $transportName = basename($this->source); - if (TELEPORT_BASE_PATH . 'workspace/' . $transportName !== realpath($this->source)) { - if (!$this->pull($this->source, TELEPORT_BASE_PATH . 'workspace/' . $transportName)) { + if (TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName !== realpath($this->source)) { + if (!$this->pull($this->source, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName)) { throw new ActionException($this, "Error pulling {$this->source}"); } } else { $this->preserveWorkspace = true; } - $this->package = Transport::retrieve($this->modx, TELEPORT_BASE_PATH . 'workspace/' . $transportName, TELEPORT_BASE_PATH . 'workspace/'); + $this->package = Transport::retrieve($this->modx, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR); if (!$this->package instanceof Transport) { - throw new ActionException($this, "Error extracting {$transportName} in workspace/"); + throw new ActionException($this, "Error extracting {$transportName} in workspace" . DIRECTORY_SEPARATOR); } $this->package->preInstall(); diff --git a/src/Teleport/Action/Profile.php b/src/Teleport/Action/Profile.php index afdff63..bdebe73 100644 --- a/src/Teleport/Action/Profile.php +++ b/src/Teleport/Action/Profile.php @@ -68,7 +68,7 @@ public function process() ), ); - $profileFilename = TELEPORT_BASE_PATH . 'profile/' . $this->code . '.profile.json'; + $profileFilename = TELEPORT_BASE_PATH . 'profile' . DIRECTORY_SEPARATOR . $this->code . '.profile.json'; $written = $this->modx->getCacheManager()->writeFile($profileFilename, $this->modx->toJSON($profile)); if ($written === false) {