Consider forward slash as directory separator when expanding homedir

This commit is contained in:
Ray Speth 2018-09-21 15:51:29 -04:00
parent c988f57e01
commit 4fe58661e1

View file

@ -397,7 +397,7 @@ std::string Application::findInputFile(const std::string& name)
std::vector<string>& dirs = inputDirs;
// Expand "~/" to user's home directory, if possible
if (name.find("~/") == 0) {
if (name.find("~/") == 0 || name.find("~\\") == 0) {
char* home = getenv("HOME"); // POSIX systems
if (!home) {
home = getenv("USERPROFILE"); // Windows systems