GetShortPathName: always erase characters at the end of the new
string, and return only single backslashes.

diff --git a/files/dos_fs.c b/files/dos_fs.c
index 0355f60..e7db742 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -939,8 +939,12 @@
 
       /* check for path delimiters and reproduce them */
       if ( longpath[lp] == '\\' || longpath[lp] == '/' ) {
-	tmpshortpath[sp] = longpath[lp];
-	sp++;
+	if (!sp || tmpshortpath[sp-1]!= '\\') 
+        {
+	    /* strip double "\\" */
+	    tmpshortpath[sp] = '\\';
+	    sp++;
+        }
 	lp++;
 	continue;
       }
@@ -967,6 +971,7 @@
       SetLastError ( ERROR_FILE_NOT_FOUND );
       return 0;
     }
+    tmpshortpath[sp] = 0;
 
     lstrcpynA ( shortpath, tmpshortpath, shortlen );
     TRACE("returning %s\n", debugstr_a(shortpath) );