Comment 5 for bug 550393

Revision history for this message
Luis Sergio Oliveira (euluis) wrote :

This is also true for enough-namestring; in windows it should be case insensitive as Allegro CL:

SBCL 2.0.10.119.master.53-8b9b0df87
CL-USER> *features*
(:SWANK :QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-WINDOWS
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :X86-64 :GENCGC :64-BIT :ANSI-CL
 :COMMON-LISP :IEEE-FLOATING-POINT :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES
 :SB-LDB :SB-PACKAGE-LOCKS :SB-SAFEPOINT :SB-SAFEPOINT-STRICTLY :SB-THREAD
 :SB-UNICODE :SBCL :WIN32)
CL-USER> (enough-namestring "/d/USERS/foo/file.txt" "/d/USERS/foo/")
"file.txt"
CL-USER> (enough-namestring "/d/USERS/foo/file.txt" "/d/users/foo/")
"/d/USERS/foo/file.txt"

International Allegro CL Enterprise Edition
10.1 [64-bit Windows] (Nov 12, 2018 10:36)
Copyright (C) 1985-2017, Franz Inc., Oakland, CA, USA. All Rights Reserved.
CL-USER> *features*
(:QUICKLISP :ASDF-PACKAGE-SYSTEM :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF
 :OS-WINDOWS :ASDF-UNICODE :SWANK :ALLEGRO-CL-ENTERPRISE :IO-TIMEOUT
 :ZLIB-DEFLATE :INFLATE-BUG20472 :ACLDNS :IDE :COMMON-GRAPHICS :RFC8141
 :RFC6874 :RFC3986 :IPV6 :ACL-SOCKET :HIPER-SOCKET :PROFILER
 :NEW-XREF-RELATIONS :|YACC Release 0.98| :COMPILER
 :USE-STRUCTS-IN-COMPILER :CLOS :ATOMIC-SUBWORD-SETF :ATOMIC-SETF
 :VERIFY-CAR-CDR :DYNLOAD :DLWIN :TARGET-MSX86-64 :X86-64 :MSWINDOWS
 :MICROSOFT :MICROSOFT-64 :LITTLE-ENDIAN :ENCAPSULATING-EFS
 :DOUBLE-FLOAT-RANDOM-FIX :RELATIVE-PACKAGE-NAMES :MODULE-VERSIONS
 :IEEE :IEEE-FLOATING-POINT :CONFORMING-IEEE :ICS :COMMON-LISP :ANSI-CL
 :DRAFT-ANSI-CL-2 :X3J13 :ALLEGRO :EXCL :FRANZ-INC :ALLEGRO-VERSION>=
 :ALLEGRO-VERSION= :NEW-ENVIRONMENTS :GSGC :FLAVORS :MULTIPROCESSING
 :OS-THREADS :ALLEGRO-V10.1 :FIXNARGS :64BIT :USE-IN-CASE-MODE
 :SMP-MACROS :SSL-SUPPORT :MSVC2015)
CL-USER> (enough-namestring "/d/USERS/foo/file.txt" "/d/USERS/foo/")
"file.txt"
CL-USER> (enough-namestring "/d/USERS/foo/file.txt" "/d/users/foo/")
"file.txt"

The problem originates from compare-component (in file sbcl/src/code/target-pathname.lisp) by the use of string= when it should use string-equal for windows, which is case insensitive.