From df29a0230c87b15e6c2b83be60eed6c50f1101cf Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 07:12:44 +0000 Subject: [PATCH] Decompile fn_18245 (RemoveDirectoryTree) Batch #16662 by kyoshi: 0 byte-identical, 1 confirmed by peer review. - fn_18245 RemoveDirectoryTree: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/File/DirectoryRemoval.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/File/DirectoryRemoval.cpp b/Source/File/DirectoryRemoval.cpp index 5a7a53304..d2bbba396 100644 --- a/Source/File/DirectoryRemoval.cpp +++ b/Source/File/DirectoryRemoval.cpp @@ -8,6 +8,8 @@ #include #include +extern template std::string::basic_string(std::_String_constructor_concat_tag, const std::string&, const char*, std::size_t, const char*, std::size_t); + // OFFSET: 0x00AF45E0 // FUNCTION: fn_18245 void RemoveDirectoryTree(const char* path) { @@ -37,11 +39,11 @@ void RemoveDirectoryTree(const char* path) { std::strcpy(filename, path); std::strcat(filename, "\\"); for (const std::string& file : files) { - _chmod((std::string(filename) + file).c_str(), _S_IWRITE); - _unlink((std::string(filename) + file).c_str()); + _chmod((filename + file).c_str(), _S_IWRITE); + _unlink((filename + file).c_str()); } for (const std::string& directory : directories) { - RemoveDirectoryTree((std::string(filename) + directory).c_str()); + RemoveDirectoryTree((filename + directory).c_str()); } } _rmdir(path);