From 25d7a5a776481e1393b0bc51dfd9a28ceb0c7f42 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Mon, 21 Sep 2009 09:58:29 +0200 Subject: [PATCH] Fixed issue 286, repository size fails on symlinks. --- src/IDF/Scm/Git.php | 2 +- src/IDF/Scm/Mercurial.php | 2 +- src/IDF/Scm/Svn.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IDF/Scm/Git.php b/src/IDF/Scm/Git.php index 9824644..89c7dfb 100644 --- a/src/IDF/Scm/Git.php +++ b/src/IDF/Scm/Git.php @@ -43,7 +43,7 @@ class IDF_Scm_Git extends IDF_Scm public function getRepositorySize() { - $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' + $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' .escapeshellarg($this->repo); $out = split(' ', shell_exec($cmd), 2); return (int) $out[0]*1024; diff --git a/src/IDF/Scm/Mercurial.php b/src/IDF/Scm/Mercurial.php index 507bd6f..e20e73c 100644 --- a/src/IDF/Scm/Mercurial.php +++ b/src/IDF/Scm/Mercurial.php @@ -35,7 +35,7 @@ class IDF_Scm_Mercurial extends IDF_Scm public function getRepositorySize() { - $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' + $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' .escapeshellarg($this->repo); $out = split(' ', shell_exec($cmd), 2); return (int) $out[0]*1024; diff --git a/src/IDF/Scm/Svn.php b/src/IDF/Scm/Svn.php index 0414ea3..2100d98 100644 --- a/src/IDF/Scm/Svn.php +++ b/src/IDF/Scm/Svn.php @@ -56,7 +56,7 @@ class IDF_Scm_Svn extends IDF_Scm if (strpos($this->repo, 'file://') !== 0) { return -1; } - $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -sk ' + $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' .escapeshellarg(substr($this->repo, 7)); $out = split(' ', shell_exec($cmd), 2); return (int) $out[0]*1024;