[Libreoffice-commits] .: desktop/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Fri Aug 10 10:37:51 PDT 2012
desktop/source/app/app.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 0ab5ce54c441b12ea6c12a2cedb9069f36cfd0f4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Aug 10 19:36:08 2012 +0200
fdo#53006: Remove directories too, not just plain files
... that was an oversight in 5300f6f711c2167931d45248c1b72dbce3a7df38; thanks
Petr for spotting it.
Change-Id: I4d0179165bc3b29d698cd776f7e1aa51fa73ebe3
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c0bc0ed..960a6e4 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -186,11 +186,16 @@ void removeTree(OUString const & url) {
} else {
if (osl::File::remove(stat.getFileURL()) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot remove " + stat.getFileURL(),
+ "cannot remove file " + stat.getFileURL(),
css::uno::Reference< css::uno::XInterface >());
}
}
}
+ if (osl::Directory::remove(url) != osl::FileBase::E_None) {
+ throw css::uno::RuntimeException(
+ "cannot remove directory " + url,
+ css::uno::Reference< css::uno::XInterface >());
+ }
}
// Remove any existing UserInstallation's user/extensions/bundled cache
More information about the Libreoffice-commits
mailing list