Lisp HUG Maillist Archive

pathnames and equal

This is LW 5.0.2 on windows 

I have two pathnames having the same printed #p-representation, but they are not equal.

Inspection shows that the components
HOST (c:), DIRECTORY, NAME, TYPE and DEVICE (:UNSPECIFIC) are equal, 
but VERSION differs :NEWEST vs. :UNSPECIFIC.

(I did not try to find out where Version was set to :NEWEST. )

Is this a feature or a bug ?

According to the spec, "Two pathnames are equal if and only if all the 
corresponding components (host, device, and so on) are equivalent."

Since VERSION does not have a meaning on windows it should not be used for determining the 
equivalence  of filenames.

I made my own pathname-equal. 

How do you handle this ?

Frank

P.S. I think to remember that allegro puts the drive letter into DEVICE rather than HOST
_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K13805B7069a


Re: pathnames and equal

Unable to parse email body. Email id is 8989

Re: pathnames and equal

On 8 Feb 2009, at 23:21, Frank Schorr wrote:

>
> Is this a feature or a bug ?

A feature
>
>
> According to the spec, "Two pathnames are equal if and only if all the
> corresponding components (host, device, and so on) are equivalent."
>
> Since VERSION does not have a meaning on windows it should not be  
> used for determining the
> equivalence  of filenames.

However, if you used those pathnamea to default components of other  
pathnames where versions *did* matter, the resulting pathnames would  
be different, so you'd have the awkward position where two equal  
pathnames gave rise to two which were not equal, which would clearly  
be wrong.

--tim


Re: pathnames and equal


Am 09.02.2009 um 00:21 schrieb Frank Schorr:

>
> This is LW 5.0.2 on windows
>
> I have two pathnames having the same printed #p-representation, but  
> they are not equal.
>
> Inspection shows that the components
> HOST (c:), DIRECTORY, NAME, TYPE and DEVICE (:UNSPECIFIC) are equal,
> but VERSION differs :NEWEST vs. :UNSPECIFIC.
>
> (I did not try to find out where Version was set to :NEWEST. )
>
> Is this a feature or a bug ?

It is a feature.
The original issue is described here:

http://www.lispworks.com/documentation/HyperSpec/Issues/iss266_w.htm

In the case of LispWorks - the following applies too:

http://www.lispworks.com/documentation/lw51/LWRM/html/lwref-113.htm#pgfId-1068148

So if you handle truenames, components like host, device or version  
are set to :UNSPECIFIC to avoid getting changed by pathname merging.  
One solution is to actually compare the namestrings (as outlined)  
since all NIL and :UNSPECIFIC components will be taken as empty  
strings. Another solution would be comparing only truenames. It  
depends on the semantics of your "EQUALness" which of those options is  
the right for your task.

ciao,
Jochen

--
Jochen Schmidt
CRISPYLOGICS
Uhlandstr. 9 , 90408 Nuremberg

Fon +49 (0)911 517 999 82
Fax +49 (0)911 517 999 83

mailto:info@crispylogics.com
http://www.crispylogics.com


Re: pathnames and equal

Unable to parse email body. Email id is 8994

Updated at: 2020-12-10 08:41 UTC