Loïc Rebmeister (@Fox2Code) commented about server/fd.c:
if (fd->unix_fd == -1) {
if (stat( name, &st ))
{
file_set_error();
goto error;
}
I think the `stat` call should be moved after the "check for trailing slash on file path" code.
As if the stat check is done here, the "check for trailing slash on file path" code path would no longer be called for `C:\NonExistingFolder`.
Everything else seems fine to me, I took my time reading to make sure I fully understood the code.