Skip to content

Commit

Permalink
os, bugfix: fix os.homedir() when USERPROFILE not set on Windows (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngot authored and xicilion committed May 23, 2019
1 parent 4272135 commit 46da2f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fibjs/src/os/os_win.cpp
Expand Up @@ -734,8 +734,7 @@ result_t os_base::homedir(exlib::string& retVal)

CloseHandle(token);

buffersize = sizeof(path);
retVal = utf16to8String(path, (int32_t)buffersize);
retVal = utf16to8String(path, (int32_t)buffersize - 1);
}
path_base::normalize(retVal, retVal);

Expand Down

0 comments on commit 46da2f7

Please sign in to comment.