From 882835c1dd619237dcc41cc7aaa2e7972003a67a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 24 Jan 2007 21:49:53 -0800 Subject: DOS FAT installer: Fix name mangling for -d option --- dos/syslinux.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dos/syslinux.c b/dos/syslinux.c index 77742120..31fb9050 100644 --- a/dos/syslinux.c +++ b/dos/syslinux.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1998-2004 H. Peter Anvin - All Rights Reserved + * Copyright 1998-2007 H. Peter Anvin - All Rights Reserved * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -603,11 +603,18 @@ int main(int argc, char *argv[]) new_ldlinux_name[2] = '\\'; for (sd = subdir; *sd; sd++) { - if (*sd == '/' || *sd == '\\') { + char c = *sd; + + if (c == '/' || c == '\\') { if (slash) continue; - *cp++ = '\\'; + c = '\\'; + slash = 1; + } else { + slash = 0; } + + *cp++ = c; } /* Skip if subdirectory == root */ -- cgit