private static function iterateProcessPathInnerHelper(string $dir, string $relative_path) {
		if ($relative_path == '') {
			return $dir;
		} else {
			$dir = trim2($dir, '^' . $relative_path, '');
			$dir = ltrim($dir, DIRECTORY_SEPARATOR);
			return $dir;
		}
	}