os.access() on a folder under windows doesn't mean anything. fixes #3587

This commit is contained in:
Yann Leboulanger 2007-12-03 21:21:10 +00:00
parent 674b4f57d5
commit d88b93b1ff
1 changed files with 3 additions and 1 deletions

View File

@ -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()