Kaydet (Commit) 70f7e60d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Move flag file extensions/bundled/buildid -> extensions/buildid

...it does not only control bundled extensions.

Change-Id: Idc4c9d3c6788fc77e90aa2478d50f2b0151a1238
(cherry picked from commit 40d413ee)
üst f09bfb30
...@@ -206,9 +206,9 @@ void removeTree(OUString const & url) { ...@@ -206,9 +206,9 @@ void removeTree(OUString const & url) {
// com.sun.star.comp.deployment.component.PackageRegistryBackend/*.rdb files // com.sun.star.comp.deployment.component.PackageRegistryBackend/*.rdb files
// contained data nevertheless. // contained data nevertheless.
// //
// When a LO upgrade is detected (i.e., no user/extensions/bundled/buildid or // When a LO upgrade is detected (i.e., no user/extensions/buildid or one
// one containing an old build ID), then user/extensions/bundled, // containing an old build ID), then user/extensions and
// user/extensions/shared, and user/uno_packages/cache/registry/ // user/uno_packages/cache/registry/
// com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc are // com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc are
// removed. That should prevent any problems starting the service manager due // removed. That should prevent any problems starting the service manager due
// to old junk. Later on in Desktop::SynchronizeExtensionRepositories, the // to old junk. Later on in Desktop::SynchronizeExtensionRepositories, the
...@@ -228,8 +228,7 @@ bool cleanExtensionCache() { ...@@ -228,8 +228,7 @@ bool cleanExtensionCache() {
"${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
":UserInstallation}/user/extensions"); ":UserInstallation}/user/extensions");
rtl::Bootstrap::expandMacros(extDir); //TODO: detect failure rtl::Bootstrap::expandMacros(extDir); //TODO: detect failure
OUString bundledDir = extDir + "/bundled"; OUString buildIdFile(extDir + "/buildid");
OUString buildIdFile(bundledDir + "/buildid");
osl::File fr(buildIdFile); osl::File fr(buildIdFile);
osl::FileBase::RC rc = fr.open(osl_File_OpenFlag_Read); osl::FileBase::RC rc = fr.open(osl_File_OpenFlag_Read);
switch (rc) { switch (rc) {
...@@ -274,10 +273,10 @@ bool cleanExtensionCache() { ...@@ -274,10 +273,10 @@ bool cleanExtensionCache() {
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop", rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop",
"cannot remove file " << userRcFile << ": " << +rc); "cannot remove file " << userRcFile << ": " << +rc);
rc = osl::Directory::createPath(bundledDir); rc = osl::Directory::createPath(extDir);
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop", rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop",
"cannot create path " << bundledDir << ": " << +rc); "cannot create path " << extDir << ": " << +rc);
osl::File fw(buildIdFile); osl::File fw(buildIdFile);
rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create); rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
if (rc != osl::FileBase::E_None) { if (rc != osl::FileBase::E_None) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment