mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-20 13:16:36 +02:00
more succinct way to get file sizes
This commit is contained in:
@ -156,14 +156,7 @@ void load_chat_history(ToxWindow *self, struct chatlog *log)
|
||||
if (log->file == NULL)
|
||||
return;
|
||||
|
||||
struct stat st;
|
||||
|
||||
if (stat(log->path, &st) == -1) {
|
||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, RED, " * Failed to stat log file");
|
||||
return;
|
||||
}
|
||||
|
||||
int sz = st.st_size;
|
||||
uint64_t sz = file_size(log->path);
|
||||
|
||||
if (sz <= 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user