From d88b93b1ff1068f73233dd03d442ca07001767d2 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Mon, 3 Dec 2007 21:21:10 +0000
Subject: [PATCH] os.access() on a folder under windows doesn't mean anything.
 fixes #3587

---
 src/filetransfers_window.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py
index b39f16f5f2..04253ee13a 100644
--- a/src/filetransfers_window.py
+++ b/src/filetransfers_window.py
@@ -340,7 +340,9 @@ _('Connection with peer cannot be established.'))
 						file_props['offset'] = dl_size
 				else:
 					dirname = os.path.dirname(file_path)
-					if not os.access(dirname, os.W_OK):
+					if not os.access(dirname, os.W_OK) and os.name != 'nt':
+						# read-only bit is used to mark special folder under windows,
+						# not to mark that a folder is read-only. See ticket #3587
 						dialogs.ErrorDialog(_('Directory "%s" is not writable') % dirname, _('You do not have permission to create files in this directory.'))
 						return
 				dialog2.destroy()
-- 
GitLab