diff --git a/src/dos/drive_cache.cpp b/src/dos/drive_cache.cpp index 124b9b45..a604aecc 100644 --- a/src/dos/drive_cache.cpp +++ b/src/dos/drive_cache.cpp @@ -412,7 +412,7 @@ void DOS_Drive_Cache::CreateEntry(CFileInfo* dir, const char* name) // Read and copy file stats char buffer[CROSS_LEN]; strcpy(buffer,dirPath); - strcat(buffer,info->fullname); + strcat(buffer,info->orgname); stat (buffer,&status); info->isDir = (S_ISDIR(status.st_mode)>0); // Check for long filenames... diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 72e9f7fd..831a1f7c 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -225,11 +225,13 @@ bool localDrive::Rename(char * oldname,char * newname) { strcpy(newold,basedir); strcat(newold,oldname); CROSS_FILENAME(newold); + dirCache.ExpandName(newold); + char newnew[CROSS_LEN]; strcpy(newnew,basedir); strcat(newnew,newname); CROSS_FILENAME(newnew); - int temp=rename(dirCache.GetExpandName(newold),dirCache.GetExpandName(newnew)); + int temp=rename(newold,dirCache.GetExpandName(newnew)); if (temp==0) dirCache.CacheOut(newnew); return (temp==0);