Philipp Stephani wrote: > + if (!file_name_absolute_p (dir)) That doesn't look right here, since leading '~' counts as absolute to file_name_absolute_p, which is not what is wanted here. > + errno = ENOTCONN; Why ENOTCONN? Shouldn't it be ENOENT? The failure has nothing to do with socket connections. Also, I'd feel a bit better if we apply the workaround only to the function that has the problem. How about the attached patch instead?