# HG changeset patch # User Frits van Bommel # Date 1244542792 -7200 # Node ID cd4478b47b10dc332baca8c91c9fd1eb99a0d0c4 # Parent a048f31bf9f6afafc7d939a729d40ed3a79e5249 Look for configuration file in `/etc` and `/etc/ldc` too (absolute paths) except on Windows. Also disabled the `$PREFIX/etc/ldc` case for Windows, since the "/etc/ldc" part was #if'ed out anyway. diff -r a048f31bf9f6 -r cd4478b47b10 gen/configfile.cpp --- a/gen/configfile.cpp Mon Jun 08 19:48:20 2009 +0200 +++ b/gen/configfile.cpp Tue Jun 09 12:19:52 2009 +0200 @@ -64,18 +64,31 @@ if (p.exists()) return true; +#if !_WIN32 + // Does Windows need something similar to these? + // 4) try the install-prefix/etc/ldc p = sys::Path(LDC_INSTALL_PREFIX); -#if !_WIN32 - // Does Windows need something similar? p.appendComponent("etc"); p.appendComponent("ldc"); -#endif p.appendComponent(filename); if (p.exists()) return true; - // 5) try next to the executable + // 5) try /etc (absolute path) + p = sys::Path("/etc"); + p.appendComponent(filename); + if (p.exists()) + return true; + + // 6) try /etc/ldc (absolute path) + p = sys::Path("/etc/ldc"); + p.appendComponent(filename); + if (p.exists()) + return true; +#endif + + // 7) try next to the executable #if _WIN32 p = ConfigGetExePath(p); #else