autorun: fix a typo in a variable name

The variable |type| doesn't exist here; what we want to do is using the
first member of the contentTypes array instead.
Probably a leftover of some refactoring of the code I did while working
on this.

This patch fixes starting of the default application for a given content
type if the control-center panel is set to run it when a device is
plugged.

https://bugzilla.gnome.org/show_bug.cgi?id=660821
This commit is contained in:
Cosimo Cecchi 2011-10-03 16:17:32 -04:00
parent c28217db80
commit 751d250471

View File

@ -491,7 +491,7 @@ AutorunTransientDispatcher.prototype = {
let app = null; let app = null;
if (setting == AutorunSetting.RUN) { if (setting == AutorunSetting.RUN) {
app = Gio.app_info_get_default_for_type(type, false); app = Gio.app_info_get_default_for_type(contentTypes[0], false);
} else if (setting == AutorunSetting.FILES) { } else if (setting == AutorunSetting.FILES) {
app = Gio.app_info_get_default_for_type('inode/directory', false); app = Gio.app_info_get_default_for_type('inode/directory', false);
} }