From 45e59810f46c9a5c5f1a49fb2977cfbd89718899 Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 3 Feb 2011 16:55:40 +0100 Subject: unrar destination fix --- module/plugins/hooks/UnRar.py | 8 ++++---- module/web/pyload_app.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'module') diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py index 3a9e0b276..751c03987 100644 --- a/module/plugins/hooks/UnRar.py +++ b/module/plugins/hooks/UnRar.py @@ -131,16 +131,16 @@ class UnRar(Hook): else: folder = download_folder - destination = None + destination = folder if self.getConfig("unrar_destination") and not self.getConfig("unrar_destination").lower() == "none": destination = self.getConfig("unrar_destination") sub = "." if self.core.config['general']['folder_per_package']: sub = pack.folder.decode(sys.getfilesystemencoding()) - if not isabs(destination): - destination = join(folder, destination, sub) - else: + if isabs(destination): destination = join(destination, sub) + else: + destination = join(folder, destination, sub) u = Unrar(join(folder, fname), tmpdir=join(folder, "tmp"), ramSize=(self.ram if self.getConfig("ramwarning") else 0), cpu=self.getConfig("renice")) try: diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 3682a3962..70686532c 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -305,8 +305,8 @@ def config(): @route("/package_ui.js") @login_required('can_see_dl') def package_ui(): - response.header['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7)) - response.header['Cache-control'] = "public" + response.headers['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7)) + response.headers['Cache-control'] = "public" return render_to_response('package_ui.js') @@ -478,4 +478,4 @@ def logs(item=-1): fro = datetime.now() if reversed: data.reverse() - return render_to_response('logs.html', {'warning': warning, 'log': data, 'from': fro.strftime('%d.%m.%Y %H:%M:%S'), 'reversed': reversed, 'perpage':perpage, 'perpage_p':sorted(perpage_p), 'iprev': 1 if item - perpage < 1 else item - perpage, 'inext': (item + perpage) if item+perpage < len(log) else item}, [pre_processor]) \ No newline at end of file + return render_to_response('logs.html', {'warning': warning, 'log': data, 'from': fro.strftime('%d.%m.%Y %H:%M:%S'), 'reversed': reversed, 'perpage':perpage, 'perpage_p':sorted(perpage_p), 'iprev': 1 if item - perpage < 1 else item - perpage, 'inext': (item + perpage) if item+perpage < len(log) else item}, [pre_processor]) -- cgit v1.2.3