diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2011-12-22 21:19:58 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2011-12-22 21:19:58 +0100 |
commit | 572132900c1cc4b851d9155c67a5b433793b12b3 (patch) | |
tree | 27aaf0c3d1404b1e676c542eb63a06586198dc3c /module | |
parent | Merge (diff) | |
download | pyload-572132900c1cc4b851d9155c67a5b433793b12b3.tar.xz |
fix filename encoding in chown/chmod
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/Plugin.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 4b6396cbc..15bf3971f 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -509,15 +509,17 @@ class Plugin(Base): self.pyfile.name = newname filename = join(location, newname) + fs_filename = fs_encode(filename) + if self.core.config["permission"]["change_file"]: - chmod(filename, int(self.core.config["permission"]["file"], 8)) + chmod(fs_filename, int(self.core.config["permission"]["file"], 8)) if self.core.config["permission"]["change_dl"] and os.name != "nt": try: uid = getpwnam(self.config["permission"]["user"])[2] gid = getgrnam(self.config["permission"]["group"])[2] - chown(filename, uid, gid) + chown(fs_filename, uid, gid) except Exception, e: self.log.warning(_("Setting User and Group failed: %s") % str(e)) |