From 317217cd7710b0ad33672f635900a44338c69ebf Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 15 Jul 2005 15:23:22 +0000 Subject: [PATCH] Fixed issues with files not showing up in the cache. This was caused by the fact that ExpandName was used instead of GetExpandName. The former modifies the name it's called with.(HunterZ Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2238 --- src/dos/drive_local.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index ff11d041..abe736c0 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: drive_local.cpp,v 1.58 2005-06-15 17:47:26 qbix79 Exp $ */ +/* $Id: drive_local.cpp,v 1.59 2005-07-15 15:23:22 qbix79 Exp $ */ #include #include @@ -53,18 +53,18 @@ bool localDrive::FileCreate(DOS_File * * file,char * name,Bit16u attributes) { strcpy(newname,basedir); strcat(newname,name); CROSS_FILENAME(newname); - dirCache.ExpandName(newname); + char* temp_name = dirCache.GetExpandName(newname); //Can only be used in till a new drive_cache action is preformed */ /* Test if file exists (so we need to truncate it). don't add to dirCache then */ bool existing_file=false; - FILE * test=fopen(newname,"rb+"); + FILE * test=fopen(temp_name,"rb+"); if(test) { fclose(test); existing_file=true; } - FILE * hand=fopen(newname,"wb+"); + FILE * hand=fopen(temp_name,"wb+"); if (!hand){ LOG_MSG("Warning: file creation failed: %s",newname); return false;