summaryrefslogtreecommitdiff
path: root/desktop/source/app/app.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-02 12:48:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-02 12:49:05 +0100
commitf97c9c25396fb6487da3b9b5284c6250c7927156 (patch)
tree2fa4f879d4fb5b11fa30d9250c9fe43eaaa66587 /desktop/source/app/app.cxx
parent02888164e76fd08a7a6d02e526669f1c4e3a0239 (diff)
migrateSettingsIfNecessary must be called later after all
...once e.g. UCB is already initialized, as the invoked migration services use it.
Diffstat (limited to 'desktop/source/app/app.cxx')
-rw-r--r--desktop/source/app/app.cxx34
1 files changed, 19 insertions, 15 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 61746be49902..5610637297e5 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -36,6 +36,7 @@
#include "userinstall.hxx"
#include "desktopcontext.hxx"
#include "exithelper.hxx"
+#include "migration.hxx"
#include <svtools/javacontext.hxx>
#include <com/sun/star/frame/XSessionManagerListener.hpp>
@@ -1476,23 +1477,21 @@ int Desktop::Main()
SetSplashScreenProgress(10);
+ UserInstall::UserInstallStatus inst_fin = UserInstall::finalize();
+ if (inst_fin != UserInstall::Ok && inst_fin != UserInstall::Created)
{
- UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
- if ( instErr_fin != UserInstall::E_None)
- {
- OSL_FAIL("userinstall failed");
- if ( instErr_fin == UserInstall::E_NoDiskSpace )
- HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
- else if ( instErr_fin == UserInstall::E_NoWriteAccess )
- HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
- else
- HandleBootstrapErrors( BE_USERINSTALL_FAILED );
- return EXIT_FAILURE;
- }
- // refresh path information
- utl::Bootstrap::reloadData();
- SetSplashScreenProgress(20);
+ OSL_FAIL("userinstall failed");
+ if ( inst_fin == UserInstall::E_NoDiskSpace )
+ HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
+ else if ( inst_fin == UserInstall::E_NoWriteAccess )
+ HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
+ else
+ HandleBootstrapErrors( BE_USERINSTALL_FAILED );
+ return EXIT_FAILURE;
}
+ // refresh path information
+ utl::Bootstrap::reloadData();
+ SetSplashScreenProgress(20);
Reference< XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
@@ -1623,6 +1622,11 @@ int Desktop::Main()
// check whether the shutdown is caused by restart
pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+
+ if (inst_fin == UserInstall::Created)
+ {
+ Migration::migrateSettingsIfNecessary();
+ }
#endif
// keep a language options instance...