From: <dat...@us...> - 2006-12-04 01:52:12
|
Revision: 17885 http://svn.sourceforge.net/gaim/?rev=17885&view=rev Author: datallah Date: 2006-12-03 17:52:05 -0800 (Sun, 03 Dec 2006) Log Message: ----------- 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. Modified Paths: -------------- trunk/libgaim/ft.c trunk/libgaim/internal.h trunk/libgaim/win32/libc_interface.h Modified: trunk/libgaim/ft.c =================================================================== --- trunk/libgaim/ft.c 2006-12-03 21:49:17 UTC (rev 17884) +++ trunk/libgaim/ft.c 2006-12-04 01:52:05 UTC (rev 17885) @@ -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); Modified: trunk/libgaim/internal.h =================================================================== --- trunk/libgaim/internal.h 2006-12-03 21:49:17 UTC (rev 17884) +++ trunk/libgaim/internal.h 2006-12-04 01:52:05 UTC (rev 17885) @@ -142,7 +142,7 @@ # define g_open open #endif -#if !GLIB_CHECK_VERSION(2,8,0) +#if !GLIB_CHECK_VERSION(2,8,0) && !defined _WIN32 # define g_access access #endif Modified: trunk/libgaim/win32/libc_interface.h =================================================================== --- trunk/libgaim/win32/libc_interface.h 2006-12-03 21:49:17 UTC (rev 17884) +++ trunk/libgaim/win32/libc_interface.h 2006-12-04 01:52:05 UTC (rev 17885) @@ -123,7 +123,6 @@ #if !GLIB_CHECK_VERSION(2,8,0) int wgaim_g_access(const gchar *filename, int mode); -#undef g_access #define g_access( filename, mode) \ wgaim_g_access( filename, mode ) #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |