diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-01-24 21:49:53 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-01-24 21:49:53 -0800 |
commit | 882835c1dd619237dcc41cc7aaa2e7972003a67a (patch) | |
tree | 61ec54de409774c2a65b84c9133a451fcf299b85 /dos | |
parent | 1ab929ad128a4c34af8007701cc85ca6b49dd7a1 (diff) | |
download | syslinux-882835c1dd619237dcc41cc7aaa2e7972003a67a.tar.gz |
DOS FAT installer: Fix name mangling for -d option
Diffstat (limited to 'dos')
-rw-r--r-- | dos/syslinux.c | 13 |
1 files 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 */ |