Fixed issue 402, Project List shows '0 bytes' Repository size on Mac OS X.

This commit is contained in:
Loic d'Anterroches 2010-02-24 15:06:13 +01:00
parent 51842c02f6
commit 64fb5b3bf0
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class IDF_Scm_Git extends IDF_Scm
if (!file_exists($this->repo)) { if (!file_exists($this->repo)) {
return 0; return 0;
} }
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk '
.escapeshellarg($this->repo); .escapeshellarg($this->repo);
$out = explode(' ', $out = explode(' ',
self::shell_exec('IDF_Scm_Git::getRepositorySize', $cmd), self::shell_exec('IDF_Scm_Git::getRepositorySize', $cmd),

View File

@ -35,7 +35,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
public function getRepositorySize() public function getRepositorySize()
{ {
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk '
.escapeshellarg($this->repo); .escapeshellarg($this->repo);
$out = explode(' ', $out = explode(' ',
self::shell_exec('IDF_Scm_Mercurial::getRepositorySize', self::shell_exec('IDF_Scm_Mercurial::getRepositorySize',

View File

@ -56,7 +56,7 @@ class IDF_Scm_Svn extends IDF_Scm
if (strpos($this->repo, 'file://') !== 0) { if (strpos($this->repo, 'file://') !== 0) {
return -1; return -1;
} }
$cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk '
.escapeshellarg(substr($this->repo, 7)); .escapeshellarg(substr($this->repo, 7));
$out = explode(' ', self::shell_exec('IDF_Scm_Svn::getRepositorySize', $cmd), 2); $out = explode(' ', self::shell_exec('IDF_Scm_Svn::getRepositorySize', $cmd), 2);
return (int) $out[0]*1024; return (int) $out[0]*1024;