From: Geoff Voelker Date: Thu, 10 Dec 1998 05:43:07 +0000 (+0000) Subject: (w32_get_long_filename): Handle root dirs correctly. X-Git-Tag: emacs-20.4~1091 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f8ac0b2d66dcbd94269e22f38989e1ed91a137c;p=emacs.git (w32_get_long_filename): Handle root dirs correctly. --- diff --git a/src/w32.c b/src/w32.c index 46d95057edb..d50cff56793 100644 --- a/src/w32.c +++ b/src/w32.c @@ -503,9 +503,10 @@ w32_get_long_filename (char * name, char * buf, int size) len = parse_root (full, &p); memcpy (o, full, len); o += len; + *o = '\0'; size -= len; - do + while (p != NULL && *p) { q = p; p = strchr (q, '\\'); @@ -528,7 +529,6 @@ w32_get_long_filename (char * name, char * buf, int size) else return FALSE; } - while (p != NULL && *p); return TRUE; }