prevent potential recusion in plugin 'volume_props'
fixed serving of fallback icon for plugins
This commit is contained in:
parent
3a88bde5d5
commit
73df006390
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -1,9 +1,8 @@
|
||||||
cryptobox (0.3.2-1) unstable; urgency=low
|
cryptobox (0.3.3-1) unstable; urgency=low
|
||||||
|
|
||||||
* improve robustness of startup-script
|
* new upstream release
|
||||||
* fix non-writeable-settings-location problems
|
|
||||||
|
|
||||||
-- Lars Kruse <devel@sumpfralle.de> Fri, 5 Jan 2007 02:20:55 +0100
|
-- Lars Kruse <devel@sumpfralle.de> Mon, 8 Jan 2007 06:15:20 +0100
|
||||||
|
|
||||||
cryptobox (0.3.1-1) unstable; urgency=low
|
cryptobox (0.3.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,9 @@ class volume_props(cryptobox.plugins.base.CryptoBoxPlugin):
|
||||||
## (e.g. chpasswd for plain containers)
|
## (e.g. chpasswd for plain containers)
|
||||||
if not p.is_useful(self.device):
|
if not p.is_useful(self.device):
|
||||||
continue
|
continue
|
||||||
|
## prevent recursion
|
||||||
|
if p.get_name() == self.get_name():
|
||||||
|
continue
|
||||||
p.device = self.device
|
p.device = self.device
|
||||||
plfname = os.path.join(p.plugin_dir, str(p.do_action(**args)) + ".cs")
|
plfname = os.path.join(p.plugin_dir, str(p.do_action(**args)) + ".cs")
|
||||||
#load_string += "<fieldset><legend><?cs var:html_escape(Lang.Plugins.%s.Link) ?></legend><?cs include:'%s' ?></fieldset>" \
|
#load_string += "<fieldset><legend><?cs var:html_escape(Lang.Plugins.%s.Link) ?></legend><?cs include:'%s' ?></fieldset>" \
|
||||||
|
|
|
@ -114,8 +114,10 @@ class CryptoBoxPlugin:
|
||||||
else:
|
else:
|
||||||
plugin_icon_file = os.path.join(self.plugin_dir, image)
|
plugin_icon_file = os.path.join(self.plugin_dir, image)
|
||||||
if not os.access(plugin_icon_file, os.R_OK):
|
if not os.access(plugin_icon_file, os.R_OK):
|
||||||
plugin_icon_file = os.path.join(
|
for ppath in self.cbox.prefs["Locations"]["PluginDir"]:
|
||||||
self.cbox.prefs["Locations"]["PluginDir"], self.fallback_icon_filename)
|
plugin_icon_file = os.path.join(ppath, self.fallback_icon_filename)
|
||||||
|
if plugin_icon_file:
|
||||||
|
break
|
||||||
return cherrypy.lib.cptools.serveFile(plugin_icon_file)
|
return cherrypy.lib.cptools.serveFile(plugin_icon_file)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue