From: havoc Date: Thu, 27 Mar 2003 08:01:33 +0000 (+0000) Subject: create directories when opening any file for writing, because it's a real pain having... X-Git-Tag: xonotic-v0.1.0preview~6717 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3781ea12c92801177ab06db1a816de94c6bc696c;p=xonotic%2Fdarkplaces.git 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 --- 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); }