sbsv2/raptor/python/plugins/filter_what.py
branchfix
changeset 203 faed4203d5c6
parent 199 3776a92b44bb
child 205 ce7b587b436c
--- a/sbsv2/raptor/python/plugins/filter_what.py	Thu Feb 11 10:08:31 2010 +0200
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Thu Feb 11 10:01:02 2010 +0000
@@ -34,19 +34,27 @@
 		"""Use chars between enclosing tags ("<>", "''", etc)
 				start = opening tag, so the line we need
 				actually starts at 'start + 1' """
+
+		abs_filename = line[(start + 1):end]
+		filename = abs_filename.replace("/","\\")
+
+		# Hack drive letters for case insensitivity on windows
+
+		path_prefix_to_strip = self.path_prefix_to_strip
 		if "win" in self.buildparameters.platform:
-			filename = line[(start + 1):end].replace("/","\\")
-		else:
-			filename = line[(start + 1):end]
+			filename = filename[0].upper()+filename[1:]
+			filename = filename.replace("/","\\")
 
-		if self.path_prefix_to_strip:
-			if filename.startswith(self.path_prefix_to_strip):
-				filename = filename[len(self.path_prefix_to_strip):]
+		if path_prefix_to_strip:
+			if "win" in self.buildparameters.platform:
+				path_prefix_to_strip = path_prefix_to_strip[0].upper()+path_prefix_to_strip[1:]
+			if filename.startswith(path_prefix_to_strip):
+				filename = filename[len(path_prefix_to_strip):]
 			if self.path_prefix_to_add_on != None:
 				filename = self.path_prefix_to_add_on + filename
 			
 		if self.check:
-			if not os.path.isfile(filename):
+			if not os.path.isfile(abs_filename):
 				print "MISSING:", filename
 				self.ok = False
 		else:
@@ -64,6 +72,7 @@
 	def open(self, build_parameters):
 		"initialise"
 		
+
 		self.buildparameters = build_parameters
 		if build_parameters.doCheck:
 			self.check = True