# HG changeset patch # User Chris Cannam # Date 1169738775 0 # Node ID e08cb0158e811f48cebf866e0af3eb250588e142 # Parent c399785358c80653edd82a08cdc20b8ba7295cfe ... diff -r c399785358c8 -r e08cb0158e81 plugin/DSSIPluginFactory.cpp --- a/plugin/DSSIPluginFactory.cpp Thu Jan 25 12:19:05 2007 +0000 +++ b/plugin/DSSIPluginFactory.cpp Thu Jan 25 15:26:15 2007 +0000 @@ -217,13 +217,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 } diff -r c399785358c8 -r e08cb0158e81 plugin/LADSPAPluginFactory.cpp --- 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 }