Skip to content
Snippets Groups Projects
Commit d88b93b1 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent 674b4f57
No related branches found
No related tags found
No related merge requests found
...@@ -340,7 +340,9 @@ _('Connection with peer cannot be established.')) ...@@ -340,7 +340,9 @@ _('Connection with peer cannot be established.'))
file_props['offset'] = dl_size file_props['offset'] = dl_size
else: else:
dirname = os.path.dirname(file_path) 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.')) dialogs.ErrorDialog(_('Directory "%s" is not writable') % dirname, _('You do not have permission to create files in this directory.'))
return return
dialog2.destroy() dialog2.destroy()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment