From b96205f05faf4a39bff3a90b382bea1c168c32db Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 10 Mar 2024 07:07:38 +0100 Subject: [PATCH] Use the sotred path when cleanin up temp files. --- modules/http_server_simple/http_parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/http_server_simple/http_parser.cpp b/modules/http_server_simple/http_parser.cpp index ace71de55..e12a87282 100644 --- a/modules/http_server_simple/http_parser.cpp +++ b/modules/http_server_simple/http_parser.cpp @@ -152,15 +152,14 @@ HTTPParser::~HTTPParser() { parser = nullptr; if (_upload_file_access) { - String path = _upload_file_access->get_path(); _upload_file_access->close(); memdelete(_upload_file_access); _upload_file_access = NULL; - DirAccess *d = DirAccess::create_for_path(path.get_base_dir()); + DirAccess *d = DirAccess::create_for_path(_upload_file_full_path.get_base_dir()); if (d) { - d->remove(path); + d->remove(_upload_file_full_path); memdelete(d); } }