From 3c88eaf92d0dc8e4d555aa07e726d501808b2136 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 31 May 2005 20:19:13 +0000 Subject: [PATCH] fix tiny bug when >> is used on a non-existing file Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2214 --- src/shell/shell.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 9085f6b8..236dcabb 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.cpp,v 1.60 2005-04-29 14:10:45 qbix79 Exp $ */ +/* $Id: shell.cpp,v 1.61 2005-05-31 20:19:13 qbix79 Exp $ */ #include #include @@ -195,8 +195,11 @@ void DOS_Shell::ParseLine(char * line) { bool status = true; /* Create if not exist. Open if exist. Both in read/write mode */ if(append) { - if( (status = DOS_OpenFile(out,2,&dummy)) ) + if( (status = DOS_OpenFile(out,2,&dummy)) ) { DOS_SeekFile(1,&bigdummy,DOS_SEEK_END); + } else { + status = DOS_CreateFile(out,2,&dummy); //Create if not exists. + } } else status = DOS_OpenFileExtended(out,2,2,0x12,&dummy,&dummy2);