sal/osl/w32/file_error.cxx | 2 +- sal/qa/osl/file/osl_File.cxx | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
New commits: commit c6553564a858a65a74c8727f08ae737c35b81a08 Author: Jan-Marek Glogowski <jan-marek.glogow...@extern.cib.de> AuthorDate: Fri Nov 29 16:07:55 2019 +0100 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Tue Dec 3 09:08:59 2019 +0100 WIN map ERROR_DIRECTORY to osl_File_E_NOTDIR The open_004 unit test fails on Windows with E_NOENT. I think the assert is correct, and it's better change the ERROR_DIRECTORY mapping, as FindFirstFileW returns ERROR_PATH_NOT_FOUND, if the path doesn't exists at all. The description of that error code in the MS API docs is "The directory name is invalid.". And obviously there is no way to tell, if this is actually a better mapping. Change-Id: Id122ce39e90f3562e70c96a06752e5b32ed55b41 Reviewed-on: https://gerrit.libreoffice.org/84070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/sal/osl/w32/file_error.cxx b/sal/osl/w32/file_error.cxx index 5336c17fd970..27b0f90cbd2d 100644 --- a/sal/osl/w32/file_error.cxx +++ b/sal/osl/w32/file_error.cxx @@ -77,7 +77,7 @@ static const struct osl_file_error_entry errtable[] = { { ERROR_FILENAME_EXCED_RANGE, osl_File_E_NOENT }, /* 206 */ { ERROR_NESTING_NOT_ALLOWED, osl_File_E_AGAIN }, /* 215 */ { ERROR_FILE_CHECKED_OUT, osl_File_E_ACCES }, /* 220 */ - { ERROR_DIRECTORY, osl_File_E_NOENT }, /* 267 */ + { ERROR_DIRECTORY, osl_File_E_NOTDIR }, /* 267 */ { ERROR_NOT_ENOUGH_QUOTA, osl_File_E_NOMEM }, /* 1816 */ { ERROR_CANT_ACCESS_FILE, osl_File_E_ACCES }, /* 1920 */ { ERROR_UNEXP_NET_ERR, osl_File_E_NETWORK } /* 59 */ diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 28f63b3055c3..31f15bc6a41f 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -4142,10 +4142,8 @@ namespace osl_Directory CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError2); } -#ifndef _WIN32 // returns E_NOENT on Windows CPPUNIT_ASSERT_MESSAGE("test for open function: open a file instead of a directory", (osl::FileBase::E_NOTDIR == nError1) || (osl::FileBase::E_ACCES == nError1)); -#endif } CPPUNIT_TEST_SUITE(open); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits