about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/engine/shared/storage.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp
index 2c7fafea..db19fcdc 100644
--- a/src/engine/shared/storage.cpp
+++ b/src/engine/shared/storage.cpp
@@ -304,6 +304,8 @@ public:
 			str_format(aPath, sizeof(aPath), "%s/%s", Data.pPath, pName);
 			Data.pPath = aPath;
 			fs_listdir(Data.pStorage->GetPath(Type, aPath, aBuf, sizeof(aBuf)), FindFileCallback, Type, &Data);
+			if(Data.pBuffer[0])
+				return 1;
 		}
 		else if(!str_comp(pName, Data.pFilename))
 		{
@@ -333,7 +335,11 @@ public:
 		{
 			// search within all available directories
 			for(int i = 0; i < m_NumPaths; ++i)
+			{
 				fs_listdir(GetPath(i, pPath, aBuf, sizeof(aBuf)), FindFileCallback, i, &Data);
+				if(pBuffer[0])
+					return true;
+			}
 		}
 		else if(Type >= 0 && Type < m_NumPaths)
 		{