From d81cc8c0c46d295a3746ac658069820c95efe895 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 11 Feb 2010 14:57:27 +0100 Subject: cnl, EOL, path fixes --- module/plugins/hooks/ExternalScripts.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'module/plugins/hooks/ExternalScripts.py') diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 30bd43770..01daab87a 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -36,17 +36,20 @@ class ExternalScripts(Hook): self.core = core self.scripts = {} - script_folders = ['scripts'+sep+'download_preparing'+sep, - 'scripts'+sep+'download_finished'+sep, - 'scripts'+sep+'package_finished'+sep, - 'scripts'+sep+'before_reconnect'+sep, - 'scripts'+sep+'after_reconnect'+sep] + script_folders = [join(core.path, 'scripts','download_preparing'), + join(core.path,'scripts','download_finished'), + join(core.path,'scripts','package_finished'), + join(core.path,'scripts','before_reconnect'), + join(core.path,'scripts','after_reconnect')] + + folder = core.make_path("scripts") + + self.core.check_file(folder, _("folders for scripts"), True) self.core.check_file(script_folders, _("folders for scripts"), True) f = lambda x: False if x.startswith("#") or x.endswith("~") else True self.scripts = {} - folder = join(self.core.path, "scripts") self.scripts['download_preparing'] = filter(f, listdir(join(folder, 'download_preparing'))) self.scripts['download_finished'] = filter(f, listdir(join(folder, 'download_finished'))) -- cgit v1.2.3