|
From: | GNU bug Tracking System |
Subject: | bug#60146: closed (file-exists-in-trash-p needs better name or semantics) |
Date: | Sat, 17 Dec 2022 23:56:01 +0000 |
Your message dated Sat, 17 Dec 2022 15:55:43 -0800 with message-id <08f9aafc-34a4-de76-df7c-fb28d9bbc607@cs.ucla.edu> and subject line Re: bug#60146: file-exists-in-trash-p needs better name or semantics has caused the debbugs.gnu.org bug report #60146, regarding file-exists-in-trash-p needs better name or semantics to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@gnu.org.) -- 60146: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60146 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems
--- Begin Message ---Subject: file-exists-in-trash-p needs better name or semantics Date: Fri, 16 Dec 2022 21:17:13 -0800 The recently-added function (file-exists-in-trash-p FILE) is poorly named since it's not really related to trash - it's simply checking for the existence of a directory entry named FILE. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 How about extending file-exists-p instead? (file-exists-p FILE t) would be like (file-exists-p FILE) except it would not follow symlinks. This extension can be implemented via a single system call on POSIX systems, and this would be more efficient and would avoid a race in the current implementation of file-exists-in-trash-p. (Though of course pretty much any use of this new function makes one vulnerable to races....)If extending file-exists-p is too much, at least please rename file-exists-in-trash-p to something like files--exists-nofollow-p, to indicate that it's private to files.el and to say better what it means.
--- End Message ---
--- Begin Message ---Subject: Re: bug#60146: file-exists-in-trash-p needs better name or semantics Date: Sat, 17 Dec 2022 15:55:43 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 On 12/17/22 12:09, Eli Zaretskii wrote:If you can verify that it works in the scenario of bug#59986, I'm okay with this change.Thanks, I checked that the patch works in that scenario (dangling symlink in the trash directory), and installed it. Closing the bug report.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |