diff libgaim/ft.c @ 15100:59189ce09f10

[gaim-migrate @ 17885] Fix wingaim file receiving. It turns out that _access() on win32 is really horrible and will fail on directories when checking any other mode than F_OK. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 04 Dec 2006 01:52:05 +0000
parents dff16b654f14
children ec96d6d2fa6d
line wrap: on
line diff
--- a/libgaim/ft.c	Sun Dec 03 21:49:17 2006 +0000
+++ b/libgaim/ft.c	Mon Dec 04 01:52:05 2006 +0000
@@ -219,9 +219,14 @@
 	if (g_stat(filename, &st) != 0) {
 		/* File not found. */
 		if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) {
+#ifndef _WIN32
+			int mode = W_OK;
+#else
+			int mode = F_OK;
+#endif
 			dir = g_path_get_dirname(filename);
 
-			if (g_access(dir, W_OK) == 0) {
+			if (g_access(dir, mode) == 0) {
 				gaim_xfer_request_accepted(xfer, filename);
 			} else {
 				gaim_xfer_ref(xfer);