[Libreoffice-commits] core.git: sal/osl
Tor Lillqvist
tml at collabora.com
Wed Aug 2 08:31:50 UTC 2017
sal/osl/unx/file_misc.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 13cadf3fe38daa0b4cfddcfa68ec8631bc85f44a
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Aug 2 11:28:39 2017 +0300
If we are going to warn about an "invalid" URL, at least tell what it is
As such the code handles it perfectly fine, and returns an error from
the function, but.
Change-Id: I356b8140381d3ccd21ff0a7f5c666552571b12f4
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 28f8edc04b59..8ee95ca2f484 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -347,8 +347,9 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory pDirectory,
oslFileError SAL_CALL osl_getDirectoryItem(rtl_uString* ustrFileURL, oslDirectoryItem* pItem)
{
- SAL_WARN_IF((!ustrFileURL) || (ustrFileURL->length == 0), "sal.file", "Invalid file URL");
- SAL_WARN_IF(!pItem, "sal.file", "pItem is nullptr");
+ SAL_WARN_IF((!ustrFileURL) || (ustrFileURL->length == 0), "sal.file",
+ "Invalid file URL " << (ustrFileURL ? ("'" + OUString(ustrFileURL) + "'") : OUString("(null)")));
+ SAL_WARN_IF(!pItem, "sal.file", "pItem is null");
rtl_uString* ustrSystemPath = nullptr;
oslFileError osl_error = osl_File_E_INVAL;
More information about the Libreoffice-commits
mailing list