X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=common.c;h=80a7389fc3b1e372a7e6d7a731e802e4f7991583;hb=08dc528c1e2e6c2b1891c12dbc69ec985387a232;hp=36d2920ee3edd6a624aa76a4a70ff30d5088d0cc;hpb=fb58cf191b52bed41ed00c4c28b2df3b43825bb3;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index 36d2920e..80a7389f 100644 --- a/common.c +++ b/common.c @@ -1381,7 +1381,7 @@ COM_WriteFile The filename will be prefixed by the current game directory ============ */ -void COM_WriteFile (char *filename, void *data, int len) +qboolean COM_WriteFile (char *filename, void *data, int len) { int handle; char name[MAX_OSPATH]; @@ -1394,13 +1394,14 @@ void COM_WriteFile (char *filename, void *data, int len) handle = Sys_FileOpenWrite (name); if (handle == -1) { - Sys_Printf ("COM_WriteFile: failed on %s\n", name); - return; + Con_Printf ("COM_WriteFile: failed on %s\n", name); + return false; } - Con_Printf ("COM_WriteFile: %s\n", name); + Con_DPrintf ("COM_WriteFile: %s\n", name); Sys_FileWrite (handle, data, len); Sys_FileClose (handle); + return true; }