diff --git a/src/CHANGELOG b/src/CHANGELOG index a6bdb91a9..2bdf69dfc 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -120,6 +120,9 @@ ECL 1.0: - MAKE-PATHNAME should remove all occurrences of single dots "." in physical pathnames and does not interpret the directory component :BACK properly. + - ENOUGH-NAMESTRING did not simplify a pathname when it had the same directory + as the default pathname. + * Unicode: - MAKE-STRING only allowed :ELEMENT-TYPE to be one of CHARACTER, BASE-CHAR, or diff --git a/src/c/pathname.d b/src/c/pathname.d index 60c2ff8e4..c55a05696 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -1158,7 +1158,9 @@ cl_host_namestring(cl_object pname) cl_index begin; cl_object dir_begin = funcall(5, @'mismatch', pathdir, defaultdir, @':test', @'equal'); - if (dir_begin != Cnil && (dir_begin == cl_length(defaultdir))) { + if (dir_begin == Cnil) { + pathdir = Cnil; + } else if (dir_begin == cl_length(defaultdir)) { pathdir = funcall(3, @'subseq', pathdir, dir_begin); pathdir = CONS(@':relative', pathdir); }