Subject: Re: bug#60188: 30.0.50; zerop cpd-length are not all handled inproject--read-file-cpd-relative

From: Juri Linkov <[email-masked]>
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)
    "")