Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
15099:77a45b20f57f | 15100:59189ce09f10 |
---|---|
217 xfer = (GaimXfer *)user_data; | 217 xfer = (GaimXfer *)user_data; |
218 | 218 |
219 if (g_stat(filename, &st) != 0) { | 219 if (g_stat(filename, &st) != 0) { |
220 /* File not found. */ | 220 /* File not found. */ |
221 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { | 221 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { |
222 #ifndef _WIN32 | |
223 int mode = W_OK; | |
224 #else | |
225 int mode = F_OK; | |
226 #endif | |
222 dir = g_path_get_dirname(filename); | 227 dir = g_path_get_dirname(filename); |
223 | 228 |
224 if (g_access(dir, W_OK) == 0) { | 229 if (g_access(dir, mode) == 0) { |
225 gaim_xfer_request_accepted(xfer, filename); | 230 gaim_xfer_request_accepted(xfer, filename); |
226 } else { | 231 } else { |
227 gaim_xfer_ref(xfer); | 232 gaim_xfer_ref(xfer); |
228 gaim_notify_message( | 233 gaim_notify_message( |
229 NULL, GAIM_NOTIFY_MSG_ERROR, NULL, | 234 NULL, GAIM_NOTIFY_MSG_ERROR, NULL, |