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
This commit is contained in:
parent
56a46702a8
commit
317217cd77
1 changed files with 4 additions and 4 deletions
|
@ -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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue