GNU bug report logs - #60188
30.0.50; zerop cpd-length are not all handled in project--read-file-cpd-relative

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang79 <at> qq.com>

Date: Mon, 19 Dec 2022 05:14:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: "Shuguang Sun" <shuguang79 <at> qq.com>
Cc: 60188 <60188 <at> debbugs.gnu.org>
Subject: bug#60188: 30.0.50; zerop cpd-length are not all handled inproject--read-file-cpd-relative
Date: Tue, 20 Dec 2022 10:41:27 +0200
>> Strange, I can't reproduce the problem. When cpd-length is 0,
>> then for the empty string (abbreviate-file-name "") returns "".

> In my case, common-parent-directory is nil.

I see.  This is because common-parent-directory is defined as:

  (if (> (length common-prefix) 0)
      (file-name-directory common-prefix))

But maybe it should also have the 'else' branch like:

  (if (> (length common-prefix) 0)
      (file-name-directory common-prefix)
    "")




This bug report was last modified 2 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.