[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-inse
From: |
Noam Postavsky |
Subject: |
bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p |
Date: |
Sat, 06 Jul 2019 09:27:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) |
Daniel Sutton <dan@dpsutton.com> writes:
> So the "bug" can be reproduced by the following, which was the important
> bits of the test:
>
> (let ((default-directory "made/up/project/location"))
> (file-name-case-insensitive-p default-directory))
>
> * note this will freeze your emacs
>
> I believe your change caused the behavior here but it seems like a
> reasonable change and CIDER is definitely not honoring the assumptions in
> `default-directory`.
>> From: Ken Brown <kbrown@cornell.edu>
>
>> On 7/4/2019 11:05 PM, Daniel Sutton wrote:
>> > Sorry for the noise and thanks for your help
>
>> No problem. I'm glad you solved it.
>
>> Closing.
Wouldn't it be better not to infloop in this case though? E.g.,
--- i/src/fileio.c
+++ w/src/fileio.c
@@ -2408,7 +2408,10 @@ DEFUN ("file-name-case-insensitive-p",
Ffile_name_case_insensitive_p,
/* If the file doesn't exist, move up the filesystem tree until we
reach an existing directory or the root. */
- if (NILP (Ffile_exists_p (filename)))
+ if (NILP (Ffile_exists_p (filename))
+ /* If default-directory is relative, expand-file-name can give
+ a relative name, in which case we can't move up. */
+ && !NILP (Ffile_name_absolute_p (filename)))
{
filename = Ffile_name_directory (filename);
while (NILP (Ffile_exists_p (filename)))
Or maybe signal an error, either way seems better than just getting stuck.
- bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Daniel Sutton, 2019/07/04
- bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/04
- Message not available
- bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/04
- Message not available
- Message not available
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Daniel Sutton, 2019/07/05
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/06
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p,
Noam Postavsky <=
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/06
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Eli Zaretskii, 2019/07/06
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/07
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Eli Zaretskii, 2019/07/07
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/07
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Eli Zaretskii, 2019/07/08
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/08
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Eli Zaretskii, 2019/07/08
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/08
- bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p, Ken Brown, 2019/07/08