X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ffileio.c;h=ff19f3efe9a4011eda360e93e484d23abbad4e04;hb=2b54d314ea5b62570e591035f26c4d475f63581d;hp=d9a6dec483c31cadbd4337a62c341f3e8f183a72;hpb=d8654f7c5ad0c04060008c6fbbd90add1f4537e3;p=chise%2Fxemacs-chise.git.1 diff --git a/src/fileio.c b/src/fileio.c index d9a6dec..ff19f3e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1335,7 +1335,23 @@ No component of the resulting pathname will be a symbolic link, as TO_EXTERNAL_FORMAT (LISP_STRING, expanded_name, ALLOCA, (path, elen), Qfile_name); + +#if defined(WIN32_FILENAMES) && defined(CYGWIN) + /* When using win32 filenames in cygwin we want file-truename to + detect that c:/windows == /windows for example. */ + if ((IS_DIRECTORY_SEP (path[0]) + && (elen == 1 || !IS_DIRECTORY_SEP (path[1]))) + || (isalpha (path[0]) + && (elen == 1 || !IS_DEVICE_SEP (path[1])))) { + int ltwff2 = + cygwin_posix_to_win32_path_list_buf_size (path); + p = (Bufbyte *) alloca (ltwff2); + cygwin_posix_to_win32_path_list (path, p); + path = p; + } +#endif p = path; + if (elen > MAXPATHLEN) goto toolong;