tdf#81146: try to make saving registrymodifications.xcu more robust

... by use of osl::File::replace, which is "atomic" on Windows, instead
of osl::File::move.

Change-Id: Ia49212f0d1cc75292f72ce219aee513e2d250ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126801
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 359b5d7..09fe094 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -114,7 +114,7 @@ void TempFile::closeAndRename(const OUString &_url) {
        throw css::uno::RuntimeException(
            "cannot close " + url);
    }
    if (osl::File::move(url, _url) != osl::FileBase::E_None) {
    if (osl::File::replace(url, _url) != osl::FileBase::E_None) {
        throw css::uno::RuntimeException(
            "cannot move " + url);
    }