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 +++++++++------ module/plugins/hooks/LinuxFileEvents.py | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'module/plugins') 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'))) diff --git a/module/plugins/hooks/LinuxFileEvents.py b/module/plugins/hooks/LinuxFileEvents.py index f71521b33..ed206866a 100644 --- a/module/plugins/hooks/LinuxFileEvents.py +++ b/module/plugins/hooks/LinuxFileEvents.py @@ -35,7 +35,7 @@ class LinuxFileEvents(Hook): if not os.name == "posix": return - self.core.check_file("container", _("folder for container"), True) + self.core.check_file(self.core.make_path("container"), _("folder for container"), True) self.core.check_install("pyinotify", _("pyinotify for LinuxFileEvents")) try: -- cgit v1.2.3