From 5f428649c362510ddf0e063841e02c2e1a5742c4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 23:20:55 +0100 Subject: [PATCH] Writing larger files fails on Windows. fix #1281 --- couchpotato/core/plugins/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index a3d5628..73a2c30 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -78,7 +78,7 @@ class Plugin(object): self.makeDir(os.path.dirname(path)) try: - f = open(path, 'w' if not binary else 'wb') + f = open(path, 'w+' if not binary else 'w+b') f.write(content) f.close() os.chmod(path, Env.getPermission('file'))