Skip to content
Snippets Groups Projects
Commit 974c09f6 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

I hate file io platform bullshit

parent 0a686d3f
No related branches found
No related tags found
No related merge requests found
...@@ -205,10 +205,11 @@ S32 LLFileSystem::tell() const ...@@ -205,10 +205,11 @@ S32 LLFileSystem::tell() const
S32 LLFileSystem::getSize() S32 LLFileSystem::getSize()
{ {
S32 file_size = 0; S32 file_size = 0;
llstat stat; LLUniqueFile filep = LLFile::fopen(mFilePath, TEXT("rb"));
if (LLFile::stat(mFilePath, &stat) == 0) if (filep)
{ {
file_size = stat.st_size; fseek(filep, 0L, SEEK_END);
file_size = ftell(filep);
} }
return file_size; return file_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment