Mercurial > hg > svcore
diff plugin/LADSPAPluginFactory.cpp @ 220:e08cb0158e81
...
author | Chris Cannam |
---|---|
date | Thu, 25 Jan 2007 15:26:15 +0000 |
parents | 4882563bd2b3 |
children | bf753a9abf0c |
line wrap: on
line diff
--- a/plugin/LADSPAPluginFactory.cpp Thu Jan 25 12:19:05 2007 +0000 +++ b/plugin/LADSPAPluginFactory.cpp Thu Jan 25 15:26:15 2007 +0000 @@ -540,13 +540,15 @@ } #ifdef _WIN32 - home = getenv("ProgramFiles"); - if (!home) home = "C:\\Program Files"; + char *pfiles = getenv("ProgramFiles"); + if (!pfiles) pfiles = "C:\\Program Files"; + { std::string::size_type f; while ((f = path.find("%ProgramFiles%")) != std::string::npos && f < path.length()) { path.replace(f, 14, pfiles); } + } #endif }