Why hasn't the patch from this message:
http://list-archive.xemacs.org/xemacs-nt/200008/msg00004.html been applied
yet? It fixes the problem with using gnuclient under cygwin from the windows
explorer. Specifically, it fixes the path problems. IE before the patch, I
would see it looking for a file name of: //E\htdocs\file3.php which doesn't
exist as a path name. However, with this patch, it translates it to
/htdocs/file3.php which is correct! Here's the patch again (please note, this
is NOT my patch! It's Jon Schewe's patch.):
--- lib-src/gnuclient.c.orig Fri Oct 9 15:58:40 1998
+++ lib-src/gnuclient.c Tue Aug 1 09:03:42 2000
@@ -42,6 +42,10 @@
static char rcsid [] = "!Header: gnuclient.c,v 2.2 95/12/12 01:39:21 wing
nene !";
#endif
+#ifdef CYGWIN
+extern void cygwin_conv_to_posix_path(const char *path, char *posix_path);
+#endif
+
#include "gnuserv.h"
#include "getopt.h"
@@ -175,35 +179,26 @@
/* fullpath - returned full pathname */
/* filename - filename to expand */
{
+#ifdef CYGWIN
+ char cygwinFilename[MAXPATHLEN+1];
+#endif
+
int len;
-
fullpath[0] = '\0';
+#ifdef CYGWIN
+ /*
+ If we're in cygwin, just convert it and let the unix stuff handle it.
+ */
+ cygwin_conv_to_posix_path(filename, cygwinFilename);
+ filename = cygwinFilename;
+#endif
+
if (filename[0] && filename[0] == '/')
{
/* Absolute (unix-style) pathname. Do nothing */
strcat (fullpath, filename);
}
-#ifdef CYGWIN
- else if (filename[0] && filename[0] == '\\' &&
- filename[1] && filename[1] == '\\')
- {
- /* This path includes the server name (something like
- "\\server\path"), so we assume it's absolute. Do nothing to
- it. */
- strcat (fullpath, filename);
- }
- else if (filename[0] &&
- filename[1] && filename[1] == ':' &&
- filename[2] && filename[2] == '\\')
- {
- /* Absolute pathname with drive letter. Convert "<drive>:"
- to "//<drive>/". */
- strcat (fullpath, "//");
- strncat (fullpath, filename, 1);
- strcat (fullpath, &filename[2]);
- }
-#endif
else
{
/* Assume relative Unix style path. Get the current directory
--
Jeff Stuart
jstuart(a)neo.rr.com