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
View this message in rfc822 format
"rrandresf <at> gmail.com" <rrandresf <at> gmail.com> writes:
> (t 2 1000 1000
> (23031 33692 430033 322000)
> (23031 41122 259655 752000)
> (23031 41122 259655 752000)
> 60 "drwx------" t 545119 28)
>
I can't work out how you could be getting this error, the message you
posted should only occur if the car of the attribute list is not t:
(unsafe (cond
((not (eq t (car attrs)))
(format "it is a %s" (if (stringp (car attrs))
"symlink" "file")))
Could you do M-x load-library RET server.el RET to load the source and
get a more detailed backtrace please. It should like something like
this:
Debugger entered--Lisp error: (error "‘/tmp/foo’ is not a safe directory because it is a file")
signal(error ("‘/tmp/foo’ is not a safe directory because it is a file"))
error("`%s' is not a safe directory because %s" "/tmp/foo" "it is a file")
(progn (error "`%s' is not a safe directory because %s" dir unsafe))
(if unsafe (progn (error "`%s' is not a safe directory because %s" dir unsafe)))
(let* ((uid (nth 2 attrs)) (w32 (eq system-type 'windows-nt)) (unsafe (cond ((not ....
(let ((attrs (file-attributes dir 'integer))) (if attrs nil (let* ((old (default-file-...
server-ensure-safe-dir("/tmp/foo")
...
And then hit 'v' on the "(let" lines to show local variables, so that it
looks like this:
Debugger entered--Lisp error: (error "‘/tmp/foo’ is not a safe directory because it is a file")
signal(error ("‘/tmp/foo’ is not a safe directory because it is a file"))
error("`%s' is not a safe directory because %s" "/tmp/foo" "it is a file")
(progn (error "`%s' is not a safe directory because %s" dir unsafe))
(if unsafe (progn (error "`%s' is not a safe directory because %s" dir unsafe)))
(let* ((uid (nth 2 attrs)) (w32 (eq system-type 'windows-nt)) (unsafe (cond ((not (eq t (car attr...
dir = "/tmp/foo"
attrs = (nil 1 1000 1000 (23031 44726 989651 161000) (23031 44726 989651 161000) (23031 44726 989651 161000) 0 "-rw-r--r--" t 3014718 2052)
uid = 1000
w32 = nil
unsafe = "it is a file"
(let ((attrs (file-attributes dir 'integer))) (if attrs nil (let* ((old (default-file-modes)))...
dir = "/tmp/foo"
attrs = (nil 1 1000 1000 (23031 44726 989651 161000) (23031 44726 989651 161000) (23031 44726 989651 161000) 0 "-rw-r--r--" t 3014718 2052)
server-ensure-safe-dir("/tmp/foo")
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.