mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-07-12 16:51:52 +02:00
Merge pull request #634 from camilstaps/master
Fixes an issue with stats in paths with whitespace
This commit is contained in:
@@ -346,9 +346,13 @@ class Repository extends BaseRepository
|
||||
if (is_numeric($file[3])) {
|
||||
$data['size'] += $file[3];
|
||||
}
|
||||
}
|
||||
|
||||
if (($pos = strrpos($file[4], '.')) !== false) {
|
||||
$extension = substr($file[4], $pos);
|
||||
$logs = $this->getClient()->run($this, 'ls-tree -l -r --name-only ' . $branch);
|
||||
$files = explode("\n", $logs);
|
||||
foreach ($files as $file) {
|
||||
if (($pos = strrpos($file, '.')) !== false) {
|
||||
$extension = substr($file, $pos);
|
||||
|
||||
if (($pos = strrpos($extension, '/')) === false) {
|
||||
$data['extensions'][] = $extension;
|
||||
|
||||
Reference in New Issue
Block a user