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:11:58 +0100 |
commit | bd9c4510ff13ab7e935ed12c5b6d1f132c6f2b79 (patch) | |
tree | 517097e1c61e85c6f7d54ced924644ea0eac8ad5 | |
parent | a6f8eb4ed1e237b49c19ed015487504f81051005 (diff) |
Take extra cache/uno_packages/*.tmp_/*properties files into account
...when migrating user extensions from an old user profile.
Change-Id: I4425eba1e840bfdb33782bb3ed0542ce48b2f75f
-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; + } } } } |