]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fs.c
create directories when opening any file for writing, because it's a real pain having...
[xonotic/darkplaces.git] / fs.c
diff --git a/fs.c b/fs.c
index eeb41d95ad43a36eec427ab8f958d76c10108d3c..33ccc73c033a2f250dd89e2ab209c68f3fb2d2a4 100644 (file)
--- 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);
        }