Mercurial > pidgin.yaz
comparison src/ft.c @ 10589:0f7452b1f777
[gaim-migrate @ 11994]
Use GLib 2.6's gstdio functions. This should fix gaim not liking non-ascii filenames in win32.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 11 Feb 2005 05:10:40 +0000 |
parents | 1a97d5e88d12 |
children | f2e86683cafc |
comparison
equal
deleted
inserted
replaced
10588:529111933c9c | 10589:0f7452b1f777 |
---|---|
169 GaimXfer *xfer; | 169 GaimXfer *xfer; |
170 struct stat st; | 170 struct stat st; |
171 | 171 |
172 xfer = (GaimXfer *)user_data; | 172 xfer = (GaimXfer *)user_data; |
173 | 173 |
174 if (stat(filename, &st) != 0) { | 174 if (g_stat(filename, &st) != 0) { |
175 /* File not found. */ | 175 /* File not found. */ |
176 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { | 176 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { |
177 gaim_xfer_request_accepted(xfer, filename); | 177 gaim_xfer_request_accepted(xfer, filename); |
178 } | 178 } |
179 else { | 179 else { |
368 | 368 |
369 gaim_xfer_unref(xfer); | 369 gaim_xfer_unref(xfer); |
370 return; | 370 return; |
371 } | 371 } |
372 | 372 |
373 if (stat(filename, &st) == -1) { | 373 if (g_stat(filename, &st) == -1) { |
374 gaim_xfer_show_file_error(xfer, filename); | 374 gaim_xfer_show_file_error(xfer, filename); |
375 gaim_xfer_unref(xfer); | 375 gaim_xfer_unref(xfer); |
376 return; | 376 return; |
377 } | 377 } |
378 | 378 |
790 static void | 790 static void |
791 begin_transfer(GaimXfer *xfer, GaimInputCondition cond) | 791 begin_transfer(GaimXfer *xfer, GaimInputCondition cond) |
792 { | 792 { |
793 GaimXferType type = gaim_xfer_get_type(xfer); | 793 GaimXferType type = gaim_xfer_get_type(xfer); |
794 | 794 |
795 xfer->dest_fp = fopen(gaim_xfer_get_local_filename(xfer), | 795 xfer->dest_fp = g_fopen(gaim_xfer_get_local_filename(xfer), |
796 type == GAIM_XFER_RECEIVE ? "wb" : "rb"); | 796 type == GAIM_XFER_RECEIVE ? "wb" : "rb"); |
797 | 797 |
798 if (xfer->dest_fp == NULL) { | 798 if (xfer->dest_fp == NULL) { |
799 gaim_xfer_show_file_error(xfer, gaim_xfer_get_local_filename(xfer)); | 799 gaim_xfer_show_file_error(xfer, gaim_xfer_get_local_filename(xfer)); |
800 gaim_xfer_cancel_local(xfer); | 800 gaim_xfer_cancel_local(xfer); |