diff --git a/tools/quake3/q3map2/shaders.cpp b/tools/quake3/q3map2/shaders.cpp index 6b980834..0701473f 100644 --- a/tools/quake3/q3map2/shaders.cpp +++ b/tools/quake3/q3map2/shaders.cpp @@ -299,6 +299,9 @@ void WriteMapShaderFile(){ Sys_FPrintf( SYS_VRB, "--- WriteMapShaderFile ---\n" ); Sys_FPrintf( SYS_VRB, "Writing %s", mapShaderFile.c_str() ); + /* ensure folder exists */ + Q_mkdir( StringStream( PathFilenameless( mapShaderFile.c_str() ) ) ); + /* open shader file */ FILE *file = fopen( mapShaderFile.c_str(), "wt" ); if ( file == nullptr ) {