- $repoDir = $GLOBALS['phorkie']['cfg']['repos'] . '/' . $this->id;
- if (!is_dir($repoDir)) {
- throw new Exception_NotFound('Paste not found');
+ protected function loadDirs()
+ {
+ $gitDir = $GLOBALS['phorkie']['cfg']['gitdir'] . '/' . $this->id . '.git';
+ if (!is_dir($gitDir)) {
+ throw new Exception_NotFound(
+ sprintf('Paste %d .git dir not found', $this->id)
+ );
+ }
+ $this->gitDir = $gitDir;
+
+ $workDir = $GLOBALS['phorkie']['cfg']['workdir'] . '/' . $this->id;
+ if (!is_dir($workDir)) {
+ throw new Exception_NotFound(
+ sprintf('Paste %d work dir not found', $this->id)
+ );