From 0684c1784fa80b264b6f63371af2315f8e5b57be Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Mon, 10 Feb 2003 12:38:44 +0000 Subject: [PATCH] Fixed bug (caching baseDir) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@662 --- src/dos/drive_cache.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/dos/drive_cache.cpp b/src/dos/drive_cache.cpp index 47408460..44565bb8 100644 --- a/src/dos/drive_cache.cpp +++ b/src/dos/drive_cache.cpp @@ -327,6 +327,18 @@ DOS_Drive_Cache::CFileInfo* DOS_Drive_Cache::FindDirInfo(const char* path, char* // LOG_DEBUG("DIR: Find %s",path); + // hehe, baseDir should be cached in... + if (!IsCachedIn(curDir)) { + strcpy(work,basePath); + if (OpenDir(curDir,work)) { + char buffer[CROSS_LEN]; + struct dirent* result; + strcpy(buffer,dirPath); + ReadDir(result); + strcpy(dirPath,buffer); + }; + }; + // Remove base dir path start += strlen(basePath); strcpy(expandedPath,basePath);