emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master fails to build on FreeBSD when ACL support is on


From: Michael Albinus
Subject: Re: master fails to build on FreeBSD when ACL support is on
Date: Sun, 21 Jan 2018 13:14:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

Hi Paul,

> Michael Albinus wrote:
>> What about `make-nearby-temp-file'?
>
> When TARGET is relative and default-directory/TARGET is in a different
> file system from default-directory, I worried that
> (make-nearby-temp-file TARGET) would be worse than (make-temp-file
> (expand-file-name TARGET)) because it'd put the temp file into
> default-directory's file system, not into TARGET's file
> system.

I have a mounted directory on "/net/ford/albinus". I get:

--8<---------------cut here---------------start------------->8---
(let ((default-directory "/net/ford"))
  (make-nearby-temp-file "albinus/foo"))

=> "/net/ford/albinus/fooDnIYRm"

(let ((default-directory "/net/ford"))
  (make-temp-file (expand-file-name "albinus/foo")))

=> "/net/ford/albinus/foo8SyB9H"
--8<---------------cut here---------------end--------------->8---

So it is almost the same. However, it differs, if the function
`temporary-file-directory' got another implementation for the underlying
file system:

--8<---------------cut here---------------start------------->8---
(let ((default-directory "/sftp::~/"))
  (make-nearby-temp-file "albinus"))

=> "/sftp:localhost:/tmp/albinustrjpRx"

(let ((default-directory "/sftp::~/"))
  (make-temp-file (expand-file-name "albinus")))

=> "/sftp:localhost:/home/albinus/albinusOCUmTW"
--8<---------------cut here---------------end--------------->8---

It is the responsibility of the `make-nearby-temp-file' implementation
to respect file system boundaries. I don't claim it is bug-free,
especially in the Tramp case it might not be as careful as it should
be. To be tested.

> However, I didn't consider it all that carefully, and if you
> think it'd be better to use make-nearby-temp-file then by all means
> please improve the code (now in master, not in emacs-26).

I have no chance to test it somewhere but on GNU/Linux, so I feel
uncomfortable to provide such a patch.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]