improved directory separator

This commit is contained in:
Steffen Schröder
2014-05-03 21:37:28 +02:00
parent 50fad3f71b
commit 7e5054b58a
9 changed files with 27 additions and 27 deletions

View File

@ -284,7 +284,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
return;
}
$zip->extractTo(ManiaControlDir . '/plugins/');
$zip->extractTo(ManiaControlDir . 'plugins' . DIRECTORY_SEPARATOR);
$zip->close();
unlink($updateFileName);
FileUtil::removeTempFolder();

View File

@ -214,7 +214,7 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
*/
public function getNightlyBuildDate() {
if (!$this->currentBuildDate) {
$nightlyBuildDateFile = ManiaControlDir . '/core/nightly_build.txt';
$nightlyBuildDateFile = ManiaControlDir . 'core' . DIRECTORY_SEPARATOR . 'nightly_build.txt';
if (file_exists($nightlyBuildDateFile)) {
$this->currentBuildDate = file_get_contents($nightlyBuildDateFile);
}
@ -282,7 +282,7 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
$this->maniaControl->log("Starting Update to Version v{$this->coreUpdateData->version}...");
$directories = array('/core/', '/plugins/');
$directories = array('core', 'plugins');
if (!FileUtil::checkWritePermissions($directories)) {
$message = 'Update not possible: Incorrect File System Permissions!';
if ($player) {
@ -362,7 +362,7 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
* @return bool
*/
private function setNightlyBuildDate($date) {
$nightlyBuildDateFile = ManiaControlDir . '/core/nightly_build.txt';
$nightlyBuildDateFile = ManiaControlDir . 'core' . DIRECTORY_SEPARATOR . 'nightly_build.txt';
$success = (bool)file_put_contents($nightlyBuildDateFile, $date);
$this->currentBuildDate = $date;
return $success;