/** * Translate a relative path to absolute when using the SCP file operation */ public static function scpXlateRelpath($path) { $oldpath = $path; if (preg_match('/^\\.\\./', $path)) { $path = preg_replace('/^\\.\\./', dirname(getcwd()), $path); } elseif (preg_match('/^\\./', $path)) { exit; $path = preg_replace('/^\\./', dirname(__FILE__), $path); } if ($oldpath !== $path) { AuxLib::DebugLog("Xlating {$oldpath} to {$path}"); } return $path; }