summaryrefslogtreecommitdiff
path: root/source/sys_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/sys_unix.c')
-rw-r--r--source/sys_unix.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/sys_unix.c b/source/sys_unix.c
index e70a271..a16b005 100644
--- a/source/sys_unix.c
+++ b/source/sys_unix.c
@@ -507,18 +507,20 @@ qboolean Sys_RenameFile( const char *from, const char *to ) {
Sys_GetFileInfo
================
*/
-fsFileInfo_t *Sys_GetFileInfo( const char *path, fsFileInfo_t *info ) {
+qboolean Sys_GetFileInfo( const char *path, fsFileInfo_t *info ) {
struct stat st;
if( stat( path, &st ) == -1 ) {
- return NULL;
+ return qfalse;
}
- info->size = st.st_size;
- info->ctime = st.st_ctime;
- info->mtime = st.st_mtime;
+ if( info ) {
+ info->size = st.st_size;
+ info->ctime = st.st_ctime;
+ info->mtime = st.st_mtime;
+ }
- return info;
+ return qtrue;
}
/*