pathCache search keeps searching even after file is found #247

Open
opened 2021-12-22 07:54:14 +00:00 by KuromeSan · 0 comments
KuromeSan commented 2021-12-22 07:54:14 +00:00 (Migrated from github.com)

380b676777/src/filesystem.cpp (L666-L674)

if you see this for loop, it will always loop until the end of the list is found,
ideally you'd stop once PHYSFS_ENUM_STOP was returned, (file was found)

for (size_t i = 0; i < fileList.size(); ++i)
			if(openReadEnumCB(data, dir, fileList[i].c_str()) == PHYSFS_ENUM_STOP)
				break;

this is likely why #246 has gone unnoticed.

https://github.com/Ancurio/mkxp/blob/380b676777b101a7d6648a8e6b9a226a8984bbc0/src/filesystem.cpp#L666-L674 if you see this for loop, it will always loop until the end of the list is found, ideally you'd stop once PHYSFS_ENUM_STOP was returned, (file was found) ``` for (size_t i = 0; i < fileList.size(); ++i) if(openReadEnumCB(data, dir, fileList[i].c_str()) == PHYSFS_ENUM_STOP) break; ``` this is likely why #246 has gone unnoticed.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#247
No description provided.