summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-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]