diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 19:08:13 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 19:08:13 +0000 |
commit | 96088fb876e156c9a4e28faef573b90febef9a8d (patch) | |
tree | 7355559b32abca35fcad64b5bfa4ba945fef7441 /chrome | |
parent | 7a2319b876d956896afe33ce99edc4001cd324c7 (diff) | |
download | chromium_src-96088fb876e156c9a4e28faef573b90febef9a8d.zip chromium_src-96088fb876e156c9a4e28faef573b90febef9a8d.tar.gz chromium_src-96088fb876e156c9a4e28faef573b90febef9a8d.tar.bz2 |
Fix a race condition in the unpacking of the extension system.
After asking for an extension to be unpacked, sometimes the
temp directory gets cleaned up before the unpacker can do its
work (in LoadExtensionsFromInstallDirectory, because the dir
contains no current version).
BUG=None
TEST=Add a reg key to HKLM to install an external extension
and make sure the extension gets installed.
Review URL: http://codereview.chromium.org/113795
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 12001e7..2f48d06 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -405,6 +405,10 @@ void ExtensionsServiceBackend::LoadExtensionsFromInstallDirectory( extension_path = enumerator.Next()) { std::string extension_id = WideToASCII( extension_path.BaseName().ToWStringHack()); + // The utility process might be in the middle of unpacking an extension, so + // ignore the temp unpacking directory. + if (extension_id == kUnpackExtensionDir) + continue; // If there is no Current Version file, just delete the directory and move // on. This can legitimately happen when an uninstall does not complete, for |