Hello Kirill,
The reason for this is:
2000-02-03 Kirill 'Big K' Katsnelson <kkm(a)dtmx.com>
<lines deleted by Adrian>
* nt.c (geteuid and friends): Use the new varibale
<lines deleted by Adrian>
(fstat, stat): Do not compile in if using MSVC 5.0 and above -
stat has been fixed in the C runtime.
<lines deleted by Adrian>
stat() in nt.c has this code:
/* Remove trailing directory separator, unless name is the root
directory of a drive or UNC volume in which case ensure there
is a trailing separator. */
len = strlen (name);
rootdir = (path >= name + len - 1
&& (IS_DIRECTORY_SEP (*path) || *path == 0));
name = strcpy ((char *)alloca (len + 2), name);
Trailing \, which is a legal directory-sep-char, must be removed from
path before calling the c runtime stat()!
What to do?
1. Reverting to encapsulate stat() and fstat()?
2. Remove trailing \ in Ffile_exists_p?
Finally some evidence, produced by
Best regards,
Adrian
XEmacs-21.2-b31+:
directory-sep-char:\
path:d:\tmp
file-exists-p:t
file-truename:d:\tmp
expand-file-name:d:\tmp
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp/
file-exists-p:nil
file-truename:d:\tmp\
expand-file-name:d:\tmp\
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp\
file-exists-p:nil
file-truename:d:\tmp\
expand-file-name:d:\tmp\
directory-file-name:d:\tmp
find-file-name-handler:nil
directory-sep-char:/
path:d:\tmp
file-exists-p:t
file-truename:d:/tmp
expand-file-name:d:/tmp
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp/
file-exists-p:t
file-truename:d:/tmp/
expand-file-name:d:/tmp/
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp\
file-exists-p:t
file-truename:d:/tmp/
expand-file-name:d:/tmp/
directory-file-name:d:\tmp
find-file-name-handler:nil
nil
XEmacs-21.1.9+
directory-sep-char:\
path:d:\tmp
file-exists-p:t
file-truename:d:\tmp
expand-file-name:d:\tmp
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp/
file-exists-p:t
file-truename:d:\tmp\
expand-file-name:d:\tmp\
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp\
file-exists-p:t
file-truename:d:\tmp\
expand-file-name:d:\tmp\
directory-file-name:d:\tmp
find-file-name-handler:nil
directory-sep-char:/
path:d:\tmp
file-exists-p:t
file-truename:d:/tmp
expand-file-name:d:/tmp
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp/
file-exists-p:t
file-truename:d:/tmp/
expand-file-name:d:/tmp/
directory-file-name:d:\tmp
find-file-name-handler:nil
path:d:\tmp\
file-exists-p:t
file-truename:d:/tmp/
expand-file-name:d:/tmp/
directory-file-name:d:\tmp
find-file-name-handler:nil
nil