all repos — fluxbox @ 25d04827b5e754c4d898240de8676eb89d105eb6

custom fork of the fluxbox windowmanager

main.cc,FbTk/StringUtil.cc: On windows, use USERPROFILE instead of HOME
Ryan Pavlik rpavlik@iastate.edu
commit

25d04827b5e754c4d898240de8676eb89d105eb6

parent

f77f5d461ba22f9e4c2af85c8666501207c163c0

2 files changed, 8 insertions(+), 1 deletions(-)

jump to
M src/FbTk/StringUtil.ccsrc/FbTk/StringUtil.cc

@@ -175,7 +175,11 @@ string expandFilename(const string &filename) {

string retval; size_t pos = filename.find_first_not_of(" \t"); if (pos != string::npos && filename[pos] == '~') { +#ifdef _WIN32 + retval = getenv("USERPROFILE"); +#else retval = getenv("HOME"); +#endif if (pos + 1 < filename.size()) { // copy from the character after '~' retval += static_cast<const char *>(filename.c_str() + pos + 1);
M src/main.ccsrc/main.cc

@@ -224,8 +224,11 @@ env = getenv("DISPLAY");

if (env && strlen(env) > 0) { session_display.assign(env); } - +#ifdef _WIN32 + env = getenv("USERPROFILE"); +#else env = getenv("HOME"); +#endif if (env && strlen(env) > 0) { rc_path.assign(std::string(env) + "/." + realProgramName("fluxbox")); rc_file = rc_path + "/init";