changeset 196:1587ff8fa3a0

* Correct path splitting patch by Beliar :-) * Fixes issues in case you check out the FIFE trunk into a directory called "engine"
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 01 Mar 2009 13:46:45 +0000
parents 13e5be34484e
children 80b3c41c3427
files engine/SConscript
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/engine/SConscript	Sun Mar 01 11:22:04 2009 +0000
+++ b/engine/SConscript	Sun Mar 01 13:46:45 2009 +0000
@@ -125,7 +125,7 @@
 				retstr.append(tabcount * '\t' + '<File RelativePath="%s"></File>' % newpath.replace('/','\\'))
 		return '\n'.join(retstr)
 
-	vcpaths = [os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1] for f in source]
+	vcpaths = [os.path.abspath(str(f)).rsplit('%sengine%s' % (_sep, _sep))[-1] for f in source]
 	xmlstr = get_msvc_repr(create_dict_tree(dict([[p, {}] for p in vcpaths])))
 	projtxt = open(joinpath(msvcbuildpath, 'engine_template.xml'), 'r').read()
 	projtxt = projtxt.replace('__FILE_INSERTION_POINT__', xmlstr)
@@ -175,7 +175,7 @@
 				retstr.append(tabcount * '\t' + '<File RelativePath="%s"></File>' % newpath.replace('/','\\'))
 		return '\n'.join(retstr)
 
-	vcpaths = [os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1] for f in source]
+	vcpaths = [os.path.abspath(str(f)).rsplit('%sengine%s' % (_sep, _sep))[-1] for f in source]
 	xmlstr = get_msvc_repr(create_dict_tree(dict([[p, {}] for p in vcpaths])))
 	projtxt = open(joinpath(msvcbuildpath9, 'engine_template.xml'), 'r').read()
 	projtxt = projtxt.replace('__FILE_INSERTION_POINT__', xmlstr)
@@ -213,7 +213,7 @@
 			</Unit>'''
 	xmlstr = []
 	for f in source:
-		newf = os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1]
+		newf = os.path.abspath(str(f)).rsplit('%sengine%s' % (_sep, _sep))[-1]
 		newf = newf.replace('/', '\\')
 		if str(f) in headerfiles:
 			xmlstr.append(codeblocksHeaderDef % newf)
@@ -246,7 +246,7 @@
 			</Unit>'''
 	xmlstr = []
 	for f in source:
-		newf = os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1]
+		newf = os.path.abspath(str(f)).rsplit('%sengine%s' % (_sep, _sep))[-1]
 		newf = newf.replace('/', '\\')
 		if str(f) in headerfiles:
 			xmlstr.append(codeblocksHeaderDef % newf)