comparison plugin/LADSPAPluginFactory.cpp @ 220:e08cb0158e81

...
author Chris Cannam
date Thu, 25 Jan 2007 15:26:15 +0000
parents 4882563bd2b3
children bf753a9abf0c
comparison
equal deleted inserted replaced
219:c399785358c8 220:e08cb0158e81
538 path.replace(f, 5, home); 538 path.replace(f, 5, home);
539 } 539 }
540 } 540 }
541 541
542 #ifdef _WIN32 542 #ifdef _WIN32
543 home = getenv("ProgramFiles"); 543 char *pfiles = getenv("ProgramFiles");
544 if (!home) home = "C:\\Program Files"; 544 if (!pfiles) pfiles = "C:\\Program Files";
545 {
545 std::string::size_type f; 546 std::string::size_type f;
546 while ((f = path.find("%ProgramFiles%")) != std::string::npos && 547 while ((f = path.find("%ProgramFiles%")) != std::string::npos &&
547 f < path.length()) { 548 f < path.length()) {
548 path.replace(f, 14, pfiles); 549 path.replace(f, 14, pfiles);
550 }
549 } 551 }
550 #endif 552 #endif
551 } 553 }
552 554
553 std::string::size_type index = 0, newindex = 0; 555 std::string::size_type index = 0, newindex = 0;