From fd91ed3fec479e11afb4b6b38e456e6c2ace1d92 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Fri, 23 Oct 2015 12:11:16 +0100 Subject: [PATCH] Need to keep the metadata file around until upload is complete --- extension/extension.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/extension.cpp b/extension/extension.cpp index 6a7a4cd..d9dc697 100644 --- a/extension/extension.cpp +++ b/extension/extension.cpp @@ -228,7 +228,6 @@ void UploadCrashDump(const char *path) strcat(metapath, ".txt"); if (libsys->PathExists(metapath)) { form->AddFile("upload_file_metadata", metapath); - unlink(metapath); } MemoryDownloader data; @@ -244,6 +243,10 @@ void UploadCrashDump(const char *path) printf(">>> UPLOADED CRASH DUMP"); printf("%s", data.GetBuffer()); } + + if (libsys->PathExists(metapath)) { + unlink(metapath); + } } void Accelerator::OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)