comparison plugin/DSSIPluginFactory.cpp @ 220:e08cb0158e81

...
author Chris Cannam
date Thu, 25 Jan 2007 15:26:15 +0000
parents 06ad01f3e553
children bf753a9abf0c
comparison
equal deleted inserted replaced
219:c399785358c8 220:e08cb0158e81
215 path.replace(f, 5, home); 215 path.replace(f, 5, home);
216 } 216 }
217 } 217 }
218 218
219 #ifdef _WIN32 219 #ifdef _WIN32
220 home = getenv("ProgramFiles"); 220 char *pfiles = getenv("ProgramFiles");
221 if (!home) home = "C:\\Program Files"; 221 if (!pfiles) pfiles = "C:\\Program Files";
222 {
222 std::string::size_type f; 223 std::string::size_type f;
223 while ((f = path.find("%ProgramFiles%")) != std::string::npos && 224 while ((f = path.find("%ProgramFiles%")) != std::string::npos &&
224 f < path.length()) { 225 f < path.length()) {
225 path.replace(f, 14, pfiles); 226 path.replace(f, 14, pfiles);
227 }
226 } 228 }
227 #endif 229 #endif
228 } 230 }
229 231
230 std::string::size_type index = 0, newindex = 0; 232 std::string::size_type index = 0, newindex = 0;