Decompile fn_18255 (CreateDirectoryPath)

Batch #13555 by eAthena: 1 byte-identical, 0 confirmed by peer review.

- fn_18255 CreateDirectoryPath: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-11-06 20:08:41 +00:00
commit 35629cad8e

View file

@ -17,14 +17,14 @@ bool CreateDirectoryPath(std::string path) {
return false;
}
std::string::size_type separator = path.find('\\');
std::string::size_type end = separator;
std::string::size_type end = path.find("\\");
std::string::size_type separator = end;
std::string prefix;
std::string remaining(path);
while (prefix.size() != path.size()) {
while (path.size() != prefix.size()) {
prefix = path.substr(0, end);
remaining = remaining.substr(separator + 1);
separator = remaining.find('\\');
separator = remaining.find("\\");
end = separator == std::string::npos ? path.size() : end + separator + 1;
if (_access(prefix.c_str(), 0) != 0 && _mkdir(prefix.c_str()) != 0) {
return false;