glocalfile: fix error code when opening a directory on win32
authorDan Winship <danw@gnome.org>
Fri, 3 Feb 2012 16:45:51 +0000 (11:45 -0500)
committerDan Winship <danw@gnome.org>
Thu, 9 Feb 2012 11:48:12 +0000 (06:48 -0500)
commitca5ed93fde448943d7ab62b057a9b16e6ed85621
treefc945be6e65a4ff1521b71f12e3a8b8b7f66ff85
parenta067df5d720096a62736d26c9e971363c0843d91
glocalfile: fix error code when opening a directory on win32

g_file_read() was returning G_IO_ERROR_IS_DIRECTORY when you tried to
open a directory on unix, but G_IO_ERROR_PERMISSION_DENIED on win32.
Fix that, and add a test to tests/file.c

Pointed out on IRC by PaweÅ‚ Forysiuk.

https://bugzilla.gnome.org/show_bug.cgi?id=669330
gio/glocalfile.c
gio/tests/file.c