[gvfs] FTP: parse file sizes > 4GB correctly
- From: Tomas Bzatek <tbzatek src gnome org>
- To: svn-commits-list gnome org
- Subject: [gvfs] FTP: parse file sizes > 4GB correctly
- Date: Thu, 7 May 2009 08:48:17 -0400 (EDT)
commit e4cca36cab78b1951db5e7aa7f590599a5d5c290
Author: Tomas Bzatek <tbzatek redhat com>
Date: Thu May 7 14:42:52 2009 +0200
FTP: parse file sizes > 4GB correctly
Use 64-bit strtoull() instead of 32-bit strtoul()
when converting string to number.
https://bugzilla.redhat.com/show_bug.cgi?id=499286
---
daemon/gvfsbackendftp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 4076053..7109607 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -1239,7 +1239,7 @@ dir_default_iter_process (gpointer iter,
else if (symlink)
*symlink = NULL;
- g_file_info_set_size (info, strtoul (result.fe_size, NULL, 10));
+ g_file_info_set_size (info, g_ascii_strtoull (result.fe_size, NULL, 10));
gvfs_file_info_populate_default (info, s,
type == 'f' ? G_FILE_TYPE_REGULAR :
@@ -2220,7 +2220,7 @@ create_file_info_from_file (GVfsBackendFtp *ftp, FtpConnection *conn,
gvfs_file_info_populate_default (info, filename, G_FILE_TYPE_REGULAR);
- g_file_info_set_size (info, strtoul (conn->read_buffer+4, NULL, 0));
+ g_file_info_set_size (info, g_ascii_strtoull (conn->read_buffer+4, NULL, 0));
g_file_info_set_is_hidden (info, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]