diff options
Diffstat (limited to 'source/blender/blenlib/intern/winstuff_dir.c')
-rw-r--r-- | source/blender/blenlib/intern/winstuff_dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.c index bde0734a740..4e2a6976ce4 100644 --- a/source/blender/blenlib/intern/winstuff_dir.c +++ b/source/blender/blenlib/intern/winstuff_dir.c @@ -119,16 +119,16 @@ struct dirent *readdir(DIR *dp) MEM_freeN(dp->direntry.d_name); dp->direntry.d_name = NULL; } - + if (dp->handle == INVALID_HANDLE_VALUE) { wchar_t *path_16 = alloc_utf16_from_8(dp->path, 0); dp->handle = FindFirstFileW(path_16, &(dp->data)); free(path_16); if (dp->handle == INVALID_HANDLE_VALUE) return NULL; - + dp->direntry.d_name = BLI_alloc_utf_8_from_16(dp->data.cFileName, 0); - + return &dp->direntry; } else if (FindNextFileW(dp->handle, &(dp->data))) { @@ -147,7 +147,7 @@ int closedir(DIR *dp) if (dp->handle != INVALID_HANDLE_VALUE) FindClose(dp->handle); MEM_freeN(dp); - + return 0; } |