GNU bug report logs -
#27871
26.0.50; Bad handling of unmounted directory
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Sat, 29 Jul 2017 21:08:02 UTC
Severity: minor
Found in version 26.0.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #43 received at 27871 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> schrieb am So., 1. Okt. 2017 um 02:00 Uhr:
> 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.
>
That shouldn't matter because getcwd never returns a string starting with ~.
>
> > + errno = ENOTCONN;
>
> Why ENOTCONN? Shouldn't it be ENOENT? The failure has nothing to do with
> socket
> connections.
>
I think ENOTCONN is the error returned by stat(".") if the current
directory doesn't exist. But I don't care much about the exact error
number, any nonzero value should do the job.
>
> Also, I'd feel a bit better if we apply the workaround only to the
> function that
> has the problem.
>
>
All of the current directory functions exhibit this behavior, including
getwd and getcwd, so you need to make sure they are also covered.
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.