From a065f9507505acbdbf5814781cb2d9797c02c20b Mon Sep 17 00:00:00 2001 From: John Garland Date: Sun, 21 Feb 2010 18:43:44 +1100 Subject: [PATCH] Cross-platform fix for #1147. --- deluge/ui/web/server.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 8eee2882e..a6c1152fd 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -34,7 +34,6 @@ # import os -import pwd import time import locale import shutil @@ -165,9 +164,7 @@ class Upload(resource.Resource): 'files': [] }) - tempdir = os.path.join(tempfile.gettempdir(), "delugeweb-%s" % pwd.getpwuid(os.getuid()).pw_name) - if not os.path.isdir(tempdir): - os.mkdir(tempdir) + tempdir = tempfile.mkdtemp(prefix="delugeweb-") filenames = [] for upload in request.args.get("file"):