From c5d76925bb9dc844abfc7c7eab8d79b06e8a4ec3 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 10 Apr 2011 15:09:00 +0000 Subject: [PATCH] copy file + file improvements; care less about spaces around the +. Thanks ripsaw Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3693 --- src/shell/shell_cmds.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 01cbec94..f4bce54a 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -586,6 +586,14 @@ void DOS_Shell::CMD_COPY(char * args) { while ( (source_p = StripWord(args)) && *source_p ) { do { char* plus = strchr(source_p,'+'); + // If StripWord() previously cut at a space before a plus then + // set concatenate flag on last source and remove leading plus. + if (plus == source_p && sources.size()) { + sources[sources.size()-1].concat = true; + // If spaces also followed plus then item is only a plus. + if (strlen(++source_p)==0) break; + plus = strchr(source_p,'+'); + } if (plus) *plus++ = 0; safe_strncpy(source_x,source_p,CROSS_LEN); bool has_drive_spec = false;