Oh, what the heck, go for it - do the size calculations in 64 bits, just
in case a file has more than 2^32 megabytes of data :-); we already require 64-bit support for calculations and formatting. svn path=/trunk/; revision=25088
This commit is contained in:
parent
fe630dbde0
commit
04daff59de
|
@ -275,11 +275,11 @@ welcome_filename_link_new(const gchar *filename, GtkWidget **label)
|
|||
err = eth_stat(filename, &stat_buf);
|
||||
if(err == 0) {
|
||||
if (stat_buf.st_size/1024/1024 > 10) {
|
||||
g_string_append_printf(str, " %dMB", (int) (stat_buf.st_size/1024/1024));
|
||||
g_string_append_printf(str, " %" G_GINT64_MODIFIER "dMB", (gint64) (stat_buf.st_size/1024/1024));
|
||||
} else if (stat_buf.st_size/1024 > 10) {
|
||||
g_string_append_printf(str, " %dKB", (int) (stat_buf.st_size/1024));
|
||||
g_string_append_printf(str, " %" G_GINT64_MODIFIER "dKB", (gint64) (stat_buf.st_size/1024));
|
||||
} else {
|
||||
g_string_append_printf(str, " %dBytes", (int) (stat_buf.st_size));
|
||||
g_string_append_printf(str, " %" G_GINT64_MODIFIER "dBytes", (gint64) (stat_buf.st_size));
|
||||
}
|
||||
} else {
|
||||
g_string_append(str, " (not found)");
|
||||
|
|
Loading…
Reference in New Issue