Module: wine Branch: master Commit: f23bf7a460c559e567015a06c7f315599fff28ed URL: http://source.winehq.org/git/wine.git/?a=commit;h=f23bf7a460c559e567015a06c7... Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Apr 27 13:29:14 2010 +0200 msi/tests: Return INVALID_FILE_SIZE from get_pf_file_size if the file can't be opened. So we can distinguish a zero-sized file from a file that doesn't exist. --- dlls/msi/tests/install.c | 2 +- dlls/msi/tests/patch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 0bf7a6a..da4e383 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -7207,7 +7207,7 @@ static DWORD get_pf_file_size(LPCSTR file) hfile = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (hfile == INVALID_HANDLE_VALUE) - return 0; + return INVALID_FILE_SIZE; size = GetFileSize(hfile, NULL); CloseHandle(hfile); diff --git a/dlls/msi/tests/patch.c b/dlls/msi/tests/patch.c index 41651ab..ff6d399 100644 --- a/dlls/msi/tests/patch.c +++ b/dlls/msi/tests/patch.c @@ -213,7 +213,7 @@ static DWORD get_pf_file_size( const char *filename ) file = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); if (file == INVALID_HANDLE_VALUE) - return 0; + return INVALID_FILE_SIZE; size = GetFileSize( file, NULL ); CloseHandle( file );