diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-04 18:11:58 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-12-15 08:32:46 +0000 |
commit | 6e963da804ed6f222a4a6c5f373d7ea6532d75ad (patch) | |
tree | a775dad275163c2b344ec825c64842f4c93cbc9f /desktop | |
parent | 82b03180e66559c53911c404af455ca0d3505948 (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)
Reviewed-on: https://gerrit.libreoffice.org/1313
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
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 12f4ec49aab3..1e38f288463d 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -145,22 +145,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; + } } } } |