From 37aa3d8b69bfecb6ed3f6953bf3ba5a1c840f8d2 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Mon, 26 Oct 2009 21:45:42 +0100 Subject: [PATCH] Fixed not to stat the size of a non existing repository. --- src/IDF/Scm/Git.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IDF/Scm/Git.php b/src/IDF/Scm/Git.php index 42570f5..395ae5b 100644 --- a/src/IDF/Scm/Git.php +++ b/src/IDF/Scm/Git.php @@ -43,6 +43,9 @@ class IDF_Scm_Git extends IDF_Scm public function getRepositorySize() { + if (!file_exists($this->repo)) { + return 0; + } $cmd = Pluf::f('idf_exec_cmd_prefix', '').'du -skD ' .escapeshellarg($this->repo); $out = explode(' ', shell_exec($cmd), 2);