desktop/source/app/app.cxx | 23 +++++++++++++---------- sal/inc/osl/file.hxx | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-)
New commits: commit 1e33b3dc73e96c6c005d13e20c3f546fcb301ed8 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jan 30 16:29:27 2013 +0100 osl::{File,Directory}::getURL() had curiously been missing Change-Id: I0af83e7aeaf681440d4bbb50d8b00390f8464b1a diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e384912..c541566 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -156,7 +156,8 @@ void removeTree(OUString const & url) { case osl::FileBase::E_NOENT: return; //TODO: SAL_WARN if recursive default: - SAL_WARN("desktop", "cannot open directory " << url << ": " << +rc); + SAL_WARN( + "desktop", "cannot open directory " << dir.getURL() << ": " << +rc); return; } for (;;) { @@ -167,7 +168,8 @@ void removeTree(OUString const & url) { } if (rc != osl::FileBase::E_None) { SAL_WARN( - "desktop","cannot iterate directory " << url << ": " << +rc); + "desktop", + "cannot iterate directory " << dir.getURL() << ": " << +rc); break; } osl::FileStatus stat( @@ -176,7 +178,8 @@ void removeTree(OUString const & url) { rc = i.getFileStatus(stat); if (rc != osl::FileBase::E_None) { SAL_WARN( - "desktop", "cannot stat in directory " << url << ": " << +rc); + "desktop", + "cannot stat in directory " << dir.getURL() << ": " << +rc); continue; } if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks @@ -192,7 +195,7 @@ void removeTree(OUString const & url) { rc = dir.close(); SAL_WARN_IF( rc != osl::FileBase::E_None, "desktop", - "cannot close directory " << url << ": " << +rc); + "cannot close directory " << dir.getURL() << ": " << +rc); } rc = osl::Directory::remove(url); SAL_WARN_IF( @@ -249,11 +252,11 @@ bool cleanExtensionCache() { osl::FileBase::RC rc2 = fr.close(); SAL_WARN_IF( rc2 != osl::FileBase::E_None, "desktop", - "cannot close " << buildIdFile << " after reading: " << +rc2); + "cannot close " << fr.getURL() << " after reading: " << +rc2); if (rc != osl::FileBase::E_None) { SAL_WARN( "desktop", - "cannot read from " << buildIdFile << ": " << +rc); + "cannot read from " << fr.getURL() << ": " << +rc); break; } OUString s2( @@ -271,7 +274,7 @@ bool cleanExtensionCache() { default: SAL_WARN( "desktop", - "cannot open " << buildIdFile << " for reading: " << +rc); + "cannot open " << fr.getURL() << " for reading: " << +rc); break; } removeTree(extDir); @@ -292,7 +295,7 @@ bool cleanExtensionCache() { if (rc != osl::FileBase::E_None) { SAL_WARN( "desktop", - "cannot open " << buildIdFile << " for writing: " << +rc); + "cannot open " << fw.getURL() << " for writing: " << +rc); return true; } OString buf(OUStringToOString(buildId, RTL_TEXTENCODING_UTF8)); @@ -305,11 +308,11 @@ bool cleanExtensionCache() { (rc != osl::FileBase::E_None || n != static_cast< sal_uInt32 >(buf.getLength())), "desktop", - "cannot write to " << buildIdFile << ": " << +rc << ", " << n); + "cannot write to " << fw.getURL() << ": " << +rc << ", " << n); rc = fw.close(); SAL_WARN_IF( rc != osl::FileBase::E_None, "desktop", - "cannot close " << buildIdFile << " after writing: " << +rc); + "cannot close " << fw.getURL() << " after writing: " << +rc); return true; } diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx index 7a61afe..5c9a268 100644 --- a/sal/inc/osl/file.hxx +++ b/sal/inc/osl/file.hxx @@ -935,6 +935,15 @@ public: close(); } + /** Obtain the URL. + + @return + the URL with which this File instance was created. + + @since LibreOffice 4.1 + */ + inline rtl::OUString getURL() const { return _aPath; } + /** Open a regular file. Open a file. Only regular files can be openend. @@ -1673,6 +1682,15 @@ public: close(); } + /** Obtain the URL. + + @return + the URL with which this Directory instance was created. + + @since LibreOffice 4.1 + */ + inline rtl::OUString getURL() const { return _aPath; } + /** Open a directory for enumerating its contents. @return _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits