rem: mountContentDir (repository, cwd, addons);
add: if (expandPath(path, sizeof path, loc, EP_ALL_SYSTEM) == -1) { fprintf (stderr, "Fatal error: Could not expand path to content " "directory: %s\n", strerror (errno)); exit (EXIT_FAILURE); }  #ifdef DEBUG fprintf (stderr, "Using '%s' as base content dir.\n", path); #endif mountContentDir (repository, path, addons);
context: prepareContentDir (const char *contentDirName, const char **addons){	const char *testfile = "version";	char cwd[PATH_MAX];	if (!fileExists (testfile))	{		if ((chdir (contentDirName) || !fileExists (testfile)) &&				(chdir ("content") || !fileExists (testfile)) &&				(chdir ("../../content") || !fileExists (testfile))) {			fprintf (stderr, "Fatal error: content not available, running from wrong dir?\n");			exit (EXIT_FAILURE);		}	}	if (getcwd(cwd, sizeof cwd) == NULL) {		fprintf (stderr, "Fatal error: Could not get the current "				"directory.\n");		exit (EXIT_FAILURE);	}	mountContentDir (repository, cwd, addons);}