From feb9cd80e4780570165cb1c2b5855900007e05be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 18 Jan 2015 13:11:35 +0000 Subject: [PATCH] [CDMAKE]: Remove potential trailing dir-separator characters at the end of the directory, in case e.g. we build up something like: "bootcd\\somefile.ext" in the boot/livecd.lst files (--> I want a directory "bootcd" and a file "somefile.ext", instead of the directory "bootcd\", otherwise the ISO becomes broken. Notice that when the path is "bootcd\somefile.ext the existing code worked ok. That's why I want to strip the remaining backslashes). svn path=/trunk/; revision=66050 --- reactos/tools/cdmake/dirhash.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/tools/cdmake/dirhash.c b/reactos/tools/cdmake/dirhash.c index fd5a40b83fd..9718871e5fd 100644 --- a/reactos/tools/cdmake/dirhash.c +++ b/reactos/tools/cdmake/dirhash.c @@ -107,6 +107,11 @@ void normalize_dirname(char *filename) } } filename[tgt] = 0; + + while (tgt && (filename[--tgt] == DIR_SEPARATOR_CHAR)) + { + filename[tgt] = 0; + } } struct target_dir_entry *