diff options
author | 2014-09-07 23:50:03 +0200 | |
---|---|---|
committer | 2014-09-14 10:59:52 +0200 | |
commit | 4cd693b5c4f2ede4ac4928b5b433b3932d64519a (patch) | |
tree | 5a22ec483885290094ac38a06a8c3bf877856820 /module/plugins/Container.py | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-4cd693b5c4f2ede4ac4928b5b433b3932d64519a.tar.xz |
save_join -> safe_join & save_path -> safe_filename
Diffstat (limited to 'module/plugins/Container.py')
-rw-r--r-- | module/plugins/Container.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/Container.py b/module/plugins/Container.py index 63804d713..59efbd8dd 100644 --- a/module/plugins/Container.py +++ b/module/plugins/Container.py @@ -6,7 +6,7 @@ from os import remove from os.path import basename, exists from module.plugins.Crypter import Crypter -from module.utils import save_join +from module.utils import safe_join class Container(Crypter): @@ -42,7 +42,7 @@ class Container(Crypter): if self.pyfile.url.startswith("http"): self.pyfile.name = re.findall("([^\/=]+)", self.pyfile.url)[-1] content = self.load(self.pyfile.url) - self.pyfile.url = save_join(self.config['general']['download_folder'], self.pyfile.name) + self.pyfile.url = safe_join(self.config['general']['download_folder'], self.pyfile.name) f = open(self.pyfile.url, "wb" ) f.write(content) f.close() @@ -50,8 +50,8 @@ class Container(Crypter): else: self.pyfile.name = basename(self.pyfile.url) if not exists(self.pyfile.url): - if exists(save_join(pypath, self.pyfile.url)): - self.pyfile.url = save_join(pypath, self.pyfile.url) + if exists(safe_join(pypath, self.pyfile.url)): + self.pyfile.url = safe_join(pypath, self.pyfile.url) else: self.fail(_("File not exists.")) |