| 145 | |
| 146 | #if defined(OS_WIN) |
| 147 | string getTemporaryDirectory() { |
| 148 | DWORD bufSize = 261; // limit according to GetTempPath documentation |
| 149 | string retVal; |
| 150 | retVal.resize(bufSize); |
| 151 | bufSize = GetTempPathA(bufSize, &retVal[0]); |
| 152 | retVal.resize(bufSize); |
| 153 | return retVal; |
| 154 | } |
| 155 | #else |
| 156 | string getHomeDirectory() { |
| 157 | string home = getEnvVar("XDG_CACHE_HOME"); |