diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-04 18:11:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-04 18:19:28 +0100 |
commit | 1ec09234241ac0d952559a104dfa5abfd4474954 (patch) | |
tree | 4473ff2d556d19f8d1609a113c814b49286adf3c /desktop | |
parent | 5370f412b8f7b954c32973c6649ff9a97eb0e2d6 (diff) |
Take extra cache/uno_packages/*.tmp_/*properties files into account
...when migrating user extensions from an old user profile.
Change-Id: I4425eba1e840bfdb33782bb3ed0542ce48b2f75f
(cherry picked from commit bd9c4510ff13ab7e935ed12c5b6d1f132c6f2b79)
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/migration/services/oo3extensionmigration.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index d994e0d165d7..aed03fa4b4a0 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -137,22 +137,25 @@ void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDi //Check next folder as the "real" extension folder is below a temp folder! ::rtl::OUString sExtensionFolderURL = fs.getFileURL(); - osl::DirectoryItem aExtDirItem; osl::Directory aExtensionRootDir( sExtensionFolderURL ); nRetCode = aExtensionRootDir.open(); - if (( nRetCode == osl::Directory::E_None ) && - ( aExtensionRootDir.getNextItem( aExtDirItem, nHint ) == osl::Directory::E_None )) + if ( nRetCode == osl::Directory::E_None ) { - bool bFileStatus = aExtDirItem.getFileStatus(fs) == osl::FileBase::E_None; - bool bIsDir = fs.getFileType() == osl::FileStatus::Directory; - - if ( bFileStatus && bIsDir ) + osl::DirectoryItem aExtDirItem; + while ( aExtensionRootDir.getNextItem( aExtDirItem, nHint ) == osl::Directory::E_None ) { - sExtensionFolderURL = fs.getFileURL(); - ScanResult eResult = scanExtensionFolder( sExtensionFolderURL ); - if ( eResult == SCANRESULT_MIGRATE_EXTENSION ) - aMigrateExtensions.push_back( sExtensionFolderURL ); + bool bFileStatus = aExtDirItem.getFileStatus(fs) == osl::FileBase::E_None; + bool bIsDir = fs.getFileType() == osl::FileStatus::Directory; + + if ( bFileStatus && bIsDir ) + { + sExtensionFolderURL = fs.getFileURL(); + ScanResult eResult = scanExtensionFolder( sExtensionFolderURL ); + if ( eResult == SCANRESULT_MIGRATE_EXTENSION ) + aMigrateExtensions.push_back( sExtensionFolderURL ); + break; + } } } } |