summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2013-04-14 18:33:25 +0200
committerTim Angus <tim@ngus.net>2013-05-31 23:10:56 +0100
commit89fe33daec9bde09702c12dca1391a801b6265a3 (patch)
tree6f2d9b8909df2107298e8cbb9e90751991a4cccc
parent4a7e86f18b2735344291aaae16e0ff88f7de4e32 (diff)
when using the condump command, do not say "dumped console text" prematurely, before trying to open the file
-rw-r--r--src/client/cl_console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/cl_console.c b/src/client/cl_console.c
index 3a3b1cfb..09e0429f 100644
--- a/src/client/cl_console.c
+++ b/src/client/cl_console.c
@@ -127,8 +127,6 @@ void Con_Dump_f (void)
Q_strncpyz( filename, Cmd_Argv( 1 ), sizeof( filename ) );
COM_DefaultExtension( filename, sizeof( filename ), ".txt" );
- Com_Printf ("Dumped console text to %s.\n", filename );
-
f = FS_FOpenFileWrite( filename );
if (!f)
{
@@ -136,6 +134,8 @@ void Con_Dump_f (void)
return;
}
+ Com_Printf ("Dumped console text to %s.\n", filename );
+
// skip empty lines
for (l = con.current - con.totallines + 1 ; l <= con.current ; l++)
{