Esempio n. 1
0
std::string Paths::getDataDir (const std::string & relativeDirPath )
{
    std::string result;
    if (existsDir(result = customDataDir  + relativeDirPath)) return result;
    if (existsDir(result = homeDataDir    + relativeDirPath)) return result;
    if (existsDir(result = defaultDataDir + relativeDirPath)) return result;
    return "not found:" + relativeDirPath;
}
Esempio n. 2
0
void testDst(const SETTINGS& s) {
	if(!s.dst) {
		printf("Must specify target directory!\n");
		exit(1);
	}
	if (!existsDir(s.dst)) {
		printf("Destination directory must exist! (Try 'mkdir %s')\n", s.dst);
		exit(1);
	}
}