Kaynağa Gözat

Path::includes now properly handles the case when parent path has a filename

BearishSun 10 yıl önce
ebeveyn
işleme
dbc17204cd
1 değiştirilmiş dosya ile 16 ekleme ve 2 silme
  1. 16 2
      BansheeUtility/Source/BsPath.cpp

+ 16 - 2
BansheeUtility/Source/BsPath.cpp

@@ -294,8 +294,22 @@ namespace BansheeEngine
 				return false;
 				return false;
 		}
 		}
 
 
-		if (isFile() && mFilename != child.mFilename)
-			return false;
+		if (!mFilename.empty())
+		{
+			if (iterChild == child.mDirectories.end())
+			{
+				if (child.mFilename.empty())
+					return false;
+
+				if (!comparePathElem(child.mFilename, mFilename))
+					return false;
+			}
+			else
+			{
+				if (!comparePathElem(*iterChild, mFilename))
+					return false;
+			}			
+		}
 
 
 		return true;
 		return true;
 	}
 	}