mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
extensionUtils: Use a unique 'subdir' to create new importers
Apparently importers for the 'same' path are shared, even when the relative paths resolve to different absolute ones. Until this bug is fixed properly, we can work around this by expressing the current extension path as the UUID relative to the parent directory. https://bugzilla.gnome.org/show_bug.cgi?id=772386
This commit is contained in:
parent
a3439a5230
commit
d769b72c43
1 changed files with 2 additions and 2 deletions
|
|
@ -151,10 +151,10 @@ function createExtensionObject(uuid, dir, type) {
|
|||
|
||||
function installImporter(extension) {
|
||||
let oldSearchPath = imports.searchPath.slice(); // make a copy
|
||||
imports.searchPath = [extension.path];
|
||||
imports.searchPath = [extension.dir.get_parent().get_path()];
|
||||
// importing a "subdir" creates a new importer object that doesn't affect
|
||||
// the global one
|
||||
extension.imports = imports['.'];
|
||||
extension.imports = imports[extension.uuid];
|
||||
imports.searchPath = oldSearchPath;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue