diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index 157d43e97e..47e35cab3f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1860,7 +1860,7 @@ open_dir_handle(const WCHAR *filename, WIN32_FIND_DATAW *fd) WCHAR fullname[MAX_PATH]; WCHAR *scanname; WCHAR *p; - int len; + int len = 0; VALUE v; // @@ -1872,6 +1872,8 @@ open_dir_handle(const WCHAR *filename, WIN32_FIND_DATAW *fd) if (fh != INVALID_HANDLE_VALUE) { len = get_final_path(fh, fullname, numberof(fullname), 0); CloseHandle(fh); + } + if (len) { filename = fullname; } else { |