From 545ae4eb8df5f4685f43dd9609e724a895cb6a85 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 28 Apr 2011 20:06:56 +0000 Subject: [PATCH] Tiny speed up Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3704 --- src/shell/shell_cmds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index f6c56246..19791879 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -600,10 +600,10 @@ void DOS_Shell::CMD_COPY(char * args) { if (source_x_len>0) { if (source_x[source_x_len-1]==':') has_drive_spec = true; } - if (!has_drive_spec) { + if (!has_drive_spec && !strpbrk(source_p,"*?") ) { //doubt that fu*\*.* is valid if (DOS_FindFirst(source_p,0xffff & ~DOS_ATTR_VOLUME)) { dta.GetResult(name,size,date,time,attr); - if (attr & DOS_ATTR_DIRECTORY && !strpbrk(source_p,"*?") ) + if (attr & DOS_ATTR_DIRECTORY) strcat(source_x,"\\*.*"); } }