summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-08-29 15:28:59 +0200
committerGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-08-29 15:28:59 +0200
commitdedce876f1f9cb9ad9f8b135ced26bf19fc1dbc7 (patch)
treeedd580c28a3b224ba2136e0e5b01d57164b372af /module/plugins/internal
parentSpare plugin updates (diff)
downloadpyload-dedce876f1f9cb9ad9f8b135ced26bf19fc1dbc7.tar.xz
[Hoster] fix pyfile.name not updated if disposition
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/Hoster.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py
index b397a92a6..a8b8922bb 100644
--- a/module/plugins/internal/Hoster.py
+++ b/module/plugins/internal/Hoster.py
@@ -44,7 +44,7 @@ def create_getInfo(klass):
class Hoster(Plugin):
__name__ = "Hoster"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -412,7 +412,7 @@ class Hoster(Plugin):
if disposition and newname:
finalname = urlparse.urlparse(newname).path.split('/')[-1].split(' filename*=')[0]
- if finalname != newname != self.pyfile.name:
+ if finalname != newname
try:
os.rename(fs_join(location, newname), fs_join(location, finalname))
@@ -421,8 +421,9 @@ class Hoster(Plugin):
finalname = newname
self.log_info(_("`%s` saved as `%s`") % (self.pyfile.name, finalname))
- self.pyfile.name = finalname
- filename = os.path.join(location, finalname)
+
+ self.pyfile.name = finalname
+ filename = os.path.join(location, finalname)
self.set_permissions(fs_encode(filename))