mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
fix getsize on 32 bit linux
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1288 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -191,6 +191,7 @@ std::string GetUserDirectory()
|
|||||||
|
|
||||||
u64 GetSize(const char *filename)
|
u64 GetSize(const char *filename)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
FILE *pFile = fopen(filename, "rb");
|
FILE *pFile = fopen(filename, "rb");
|
||||||
if (pFile)
|
if (pFile)
|
||||||
{
|
{
|
||||||
@ -199,6 +200,15 @@ u64 GetSize(const char *filename)
|
|||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
struct stat buf;
|
||||||
|
if (stat(filename, &buf) == 0) {
|
||||||
|
return buf.st_size;
|
||||||
|
}
|
||||||
|
int err = errno;
|
||||||
|
PanicAlert("Error stating %s: %s", filename, strerror(err));
|
||||||
|
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,6 +273,7 @@ u32 ScanDirectoryTree(const std::string& _Directory, FSTEntry& parentEntry)
|
|||||||
#else
|
#else
|
||||||
u32 ScanDirectoryTree(const std::string& _Directory, FSTEntry& parentEntry)
|
u32 ScanDirectoryTree(const std::string& _Directory, FSTEntry& parentEntry)
|
||||||
{
|
{
|
||||||
|
PanicAlert("Scan directory not implemanted yet\n");
|
||||||
// TODO - Insert linux stuff here
|
// TODO - Insert linux stuff here
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user