mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Fixed wrong path detection on Windows
This commit is contained in:
4
boot.php
4
boot.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && !defined('WINDOWS_BUILD')) {
|
||||||
define('WINDOWS_BUILD', 1);
|
define('WINDOWS_BUILD', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ $app->mount('', new GitList\Controller\BlobController());
|
|||||||
$app->mount('', new GitList\Controller\CommitController());
|
$app->mount('', new GitList\Controller\CommitController());
|
||||||
$app->mount('', new GitList\Controller\TreeController());
|
$app->mount('', new GitList\Controller\TreeController());
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ class Client
|
|||||||
$isRepository = file_exists($file->getPathname() . '/.git/HEAD');
|
$isRepository = file_exists($file->getPathname() . '/.git/HEAD');
|
||||||
|
|
||||||
if ($isRepository || $isBare) {
|
if ($isRepository || $isBare) {
|
||||||
if (in_array($file->getPathname(), $this->getHidden())) {
|
$pathName = str_replace('\\', '/', $file->getPathname());
|
||||||
|
|
||||||
|
if (in_array($pathName, $this->getHidden())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +108,7 @@ class Client
|
|||||||
$description = 'There is no repository description file. Please, create one to remove this message.';
|
$description = 'There is no repository description file. Please, create one to remove this message.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$repositories[] = array('name' => $file->getFilename(), 'path' => $file->getPathname(), 'description' => $description);
|
$repositories[] = array('name' => $file->getFilename(), 'path' => $pathName, 'description' => $description);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user