Browse Source

Test of ethash_get_default_dirname() and bug fix

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
a6a882c57a
  1. 2
      io_posix.c
  2. 2
      io_win32.c

2
io_posix.c

@ -86,7 +86,7 @@ bool ethash_file_size(FILE* f, size_t* ret_size)
bool ethash_get_default_dirname(char* strbuf, size_t buffsize)
{
strbuf[0] = '\n';
strbuf[0] = '\0';
char* home_dir = getenv("HOME");
size_t len = strlen(home_dir);
if (!ethash_strncat(strbuf, buffsize, home_dir, len)) {

2
io_win32.c

@ -87,7 +87,7 @@ bool ethash_file_size(FILE* f, size_t* ret_size)
bool ethash_get_default_dirname(char* strbuf, size_t buffsize)
{
strbuf[0] = '\n';
strbuf[0] = '\0';
if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, (WCHAR*)strbuf))) {
return false;
}

Loading…
Cancel
Save