Consider forward slash as directory separator when expanding homedir
This commit is contained in:
parent
c988f57e01
commit
4fe58661e1
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue