From d72481e5acde160212468dc4329bd12a28fe8a9b Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:30:35 +0400 Subject: [PATCH] engine: netchan: fixed downloading files output directory --- engine/common/net_chan.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index e2eea39e..5662fe49 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -1192,6 +1192,13 @@ qboolean Netchan_CopyFileFragments( netchan_t *chan, sizebuf_t *msg ) return false; } + if( filename[0] != '!' ) + { + string temp_filename; + Q_snprintf( temp_filename, sizeof( temp_filename ), "downloaded/%s", filename ); + Q_strncpy( filename, temp_filename, sizeof( filename )); + } + Q_strncpy( chan->incomingfilename, filename, sizeof( chan->incomingfilename )); if( filename[0] != '!' && FS_FileExists( filename, false ))