GNU bug report logs -
#29070
26.0.90; (file-attributes dir) => nil, even though (and (file-exists-p dir) (file-directory-p dir)) => t
Previous Next
Reported by: rrandresf <at> gmail.com
Date: Mon, 30 Oct 2017 20:03:01 UTC
Severity: normal
Found in version 26.0.90
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
Full log
Message #70 received at 29070 <at> debbugs.gnu.org (full text, mbox):
On Okt 31 2017, andrés ramírez <rrandresf <at> gmail.com> wrote:
> Hi Andreas.
>> What is the kernel version you are running?
>
> Linux chulpaca 3.4.113-sun8i #18 SMP PREEMPT Thu Jun 15 02:16:06 CEST 2017 armv7l GNU/Linux
That kernel does not support fstat on the O_PATH fd. Please try this
patch:
diff --git a/src/dired.c b/src/dired.c
index 28d1cffb44..f192cf5c49 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -953,7 +953,14 @@ file_attributes (int fd, char const *name,
{
record_unwind_protect_int (close_file_unwind, namefd);
if (fstat (namefd, &s) != 0)
- err = errno;
+ {
+ err = errno;
+ /* The Linux kernel only supports fstat on O_PATH file
+ descriptors since version 3.6. Handle this error like
+ missing support for O_PATH. */
+ if (err == EBADF)
+ err = EINVAL;
+ }
else
{
err = 0;
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 7 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.