mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-01 05:47:01 +01:00
Use the sotred path when cleanin up temp files.
This commit is contained in:
parent
2f950e87d6
commit
b96205f05f
@ -152,15 +152,14 @@ HTTPParser::~HTTPParser() {
|
|||||||
parser = nullptr;
|
parser = nullptr;
|
||||||
|
|
||||||
if (_upload_file_access) {
|
if (_upload_file_access) {
|
||||||
String path = _upload_file_access->get_path();
|
|
||||||
_upload_file_access->close();
|
_upload_file_access->close();
|
||||||
memdelete(_upload_file_access);
|
memdelete(_upload_file_access);
|
||||||
_upload_file_access = NULL;
|
_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) {
|
if (d) {
|
||||||
d->remove(path);
|
d->remove(_upload_file_full_path);
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user