summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-08-10 19:36:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-10 19:36:08 +0200
commit0ab5ce54c441b12ea6c12a2cedb9069f36cfd0f4 (patch)
treef2409eec357c8c0bd06ab70ceac300f02ec83606 /desktop
parent293151c8fc10c5a0ba84c5c5a796a3c72f573654 (diff)
fdo#53006: Remove directories too, not just plain files
... that was an oversight in 5300f6f711c2167931d45248c1b72dbce3a7df38; thanks Petr for spotting it. Change-Id: I4d0179165bc3b29d698cd776f7e1aa51fa73ebe3
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c0bc0edd938c..960a6e46cf82 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