pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] file-name.c and MinGW paths.


From: Ben Pfaff
Subject: Re: [PATCH] file-name.c and MinGW paths.
Date: Sat, 17 Feb 2007 17:09:59 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

>> > When it canonicalizes  the path it converts all \'s to the posixish
>> > /'s. It should really also prefix all the paths with "A:" or, "C:" or
>> > whatever too.
>>
>> I don't think the change to fn_get_identity is sufficient to fix
>> the problem, because as I read the implementation of
>> canonicalize_filename_mode, it doesn't properly handle \-style
>> directory separators anyhow.  I think that we'll need to submit a
>> fix for that to the gnulib folks.
>>
>> Is there no way to ask Windows "Are these two files the same
>> file"?  It seems like a basic file system property that any
>> system would be able to answer.
>
> Windows, does not answer this question, see e.g.
>  http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=349270&SiteID=1
> however the GetFullPathName function would help:
>  http://msdn2.microsoft.com/en-us/library/aa364963.aspx
> should be good enough for our purposes.

Seeing as GetFullPathName seems to do what we want, and
canonicalize_filename_mode doesn't, and we don't use
canonicalize_filename_mode anywhere else in PSPP, I suppose we
should just drop canonicalize_filename_mode entirely (and the
"canonicalize" gnulib module) and just use GetFullPathName
directly in fn_get_identity.

> We also probably also convert the pathname to upper-case in
> canonicalize as well, although that seems somehow ugly to me.

Or use strcasecmp in fn_compare_file_identities.
-- 
Ben Pfaff 
address@hidden
http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]