diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-08-10 19:36:08 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-08-13 11:35:37 +0200 |
commit | 8609e601b7351fd9480475e12e9e2c1aa7811c78 (patch) | |
tree | 28f6a8ef44da3dd0788be4c77590a0e10122bbe5 | |
parent | cd656ac11743a6472f5a5fafe9b97d3fe5d11e0e (diff) |
fdo#53006: Remove directories too, not just plain files
... that was an oversight in 5300f6f711c2167931d45248c1b72dbce3a7df38; thanks
Petr for spotting it.
Change-Id: I4d0179165bc3b29d698cd776f7e1aa51fa73ebe3
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r-- | desktop/source/app/app.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 6efc9f46acde..eff4d04f7f9a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -185,11 +185,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 |