mkxp icon indicating copy to clipboard operation
mkxp copied to clipboard

pathCache search keeps searching even after file is found

Open LiEnby opened this issue 3 years ago • 0 comments

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.

LiEnby avatar Dec 22 '21 07:12 LiEnby