aboutsummaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-01-24 21:24:30 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-01-24 21:24:30 -0800
commit8a9e0c7b9bcc70fdf7a737defcb04b1662523962 (patch)
tree9626f38da89df294aff0ed131d2bab074b203df7 /win32
parentc656897fd2f4ca76e5d6e2a871a858588de0d312 (diff)
downloadsyslinux-8a9e0c7b9bcc70fdf7a737defcb04b1662523962.tar.gz
syslinux-8a9e0c7b9bcc70fdf7a737defcb04b1662523962.tar.xz
syslinux-8a9e0c7b9bcc70fdf7a737defcb04b1662523962.zip
Win32 FAT installer: fix path mangling for -d option
Diffstat (limited to 'win32')
-rw-r--r--win32/syslinux.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/win32/syslinux.c b/win32/syslinux.c
index 1b5b8fda..f5d6eae6 100644
--- a/win32/syslinux.c
+++ b/win32/syslinux.c
@@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 2003 Lars Munch Christensen - All Rights Reserved
- * Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
+ * Copyright 1998-2007 H. Peter Anvin - All Rights Reserved
*
* Based on the Linux installer program for SYSLINUX by H. Peter Anvin
*
@@ -463,11 +463,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 */