summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-22 18:24:15 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-22 18:24:15 +0200
commitc2102ca45b5a03f8355363d14af00a0cee9c28e9 (patch)
treec24f5cb059028c1ec64d95fe268fd6de01c3213c /module/plugins/Plugin.py
parentunrar for win (diff)
downloadpyload-c2102ca45b5a03f8355363d14af00a0cee9c28e9.tar.xz
win compability
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 987305d17..d197ec1a3 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -28,13 +28,15 @@ from random import randint
import sys
from os.path import exists
+import os
from os import remove
from os import makedirs
from os import chmod
-from os import chown
-from pwd import getpwnam
-from grp import getgrnam
+if os.name != "nt":
+ from os import chown
+ from pwd import getpwnam
+ from grp import getgrnam
from mimetypes import guess_type
@@ -277,7 +279,7 @@ class Plugin(object):
if self.core.config["permission"]["change_file"]:
chmod(join(location, name), int(self.core.config["permission"]["file"],8))
- if self.core.config["permission"]["change_user"] and self.core.config["permission"]["change_group"]:
+ if self.core.config["permission"]["change_user"] and self.core.config["permission"]["change_group"] and os.name != "nt":
try:
uid = getpwnam(self.config["permission"]["user"])[2]
gid = getgrnam(self.config["permission"]["group"])[2]