ENOUGH-NAMESTRING did not simplify paths that had completely equivalent directories

This commit is contained in:
jgarcia 2007-01-05 18:33:12 +00:00
parent 7992f81741
commit e6502efe62
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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);
}