From 3aecdcf42c870fcccc0cf955b6bcfa7193123f1d Mon Sep 17 00:00:00 2001 From: Brian Koropoff Date: Sun, 25 May 2003 05:40:25 +0000 Subject: [PATCH] Added a temporary hack to make ~/.quakeforgerc work again. --- include/QF/quakefs.h | 3 +++ libs/util/cmd.c | 4 +++- libs/util/quakefs.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/QF/quakefs.h b/include/QF/quakefs.h index 9cae2aaea..5acb3fe3d 100644 --- a/include/QF/quakefs.h +++ b/include/QF/quakefs.h @@ -103,4 +103,7 @@ char *QFS_CompressPath (const char *pth); const char *QFS_SkipPath (const char *pathname); const char *QFS_FileExtension (const char *in); +// FIXME: This is here temporarily until fs_usercfg gets sorted out +char *expand_squiggle (const char *path); + #endif // __quakefs_h diff --git a/libs/util/cmd.c b/libs/util/cmd.c index 5c803c2db..20f17882e 100644 --- a/libs/util/cmd.c +++ b/libs/util/cmd.c @@ -625,7 +625,9 @@ Cmd_Exec_File (cbuf_t *cbuf, const char *path, int qfs) if (qfs) { QFS_FOpenFile (path, &file); } else { - file = Qopen (path, "r"); + char *newpath = expand_squiggle (path); + file = Qopen (newpath, "r"); + free (newpath); } if (file) { len = Qfilesize (file); diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 849a6bcc3..88ca511c4 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -1125,7 +1125,7 @@ QFS_Gamedir (const char *dir) Cache_Flush (); } -static char * +char * expand_squiggle (const char *path) { char *home;