Which version is this against?
My portable.cpp has if (p.exists() && p.open(IO_ReadOnly)) { and else if (f.exists() && f.open(IO_ReadOnly)) {instead of the plainer version in the patch.