From 3781ea12c92801177ab06db1a816de94c6bc696c Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 27 Mar 2003 08:01:33 +0000 Subject: [PATCH] create directories when opening any file for writing, because it's a real pain having to do it elsewhere git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2853 d7cf8633-e32d-0410-b094-e92efae38249 --- fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs.c b/fs.c index eeb41d95..33ccc73c 100644 --- a/fs.c +++ b/fs.c @@ -573,6 +573,10 @@ qfile_t* FS_Open (const char* filepath, const char* mode, qboolean quiet) // Open the file on disk directly snprintf (real_path, sizeof (real_path), "%s/%s", fs_gamedir, filepath); + + // Create directories up to the file + FS_CreatePath (real_path); + return FS_SysOpen (real_path, mode); } -- 2.39.2