mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Makes GetModSrc check the common folder when attempting to extract source files
This commit is contained in:
1 parent
640446b868
commit
87104f0e2d
1 file changed
+20
-2
+20
-2
@@ -200,10 +200,28 @@
|
||||
|
||||
# HINT: We need a table for the old md5 and the new ones
|
||||
md5table = {}
|
||||
@@ -1656,3 +1699,6 @@
|
||||
@@ -1646,6 +1689,7 @@
|
||||
# HINT: We extract the source files for the modified class files
|
||||
for in_class in trgclasses:
|
||||
src_file = os.path.normpath(os.path.join(src[side], in_class + '.java'))
|
||||
+ cmn_file = os.path.normpath(os.path.join(self.srcshared, in_class + '.java'))
|
||||
dest_file = os.path.normpath(os.path.join(outpathlk[side], in_class + '.java'))
|
||||
if os.path.isfile(src_file):
|
||||
if not os.path.exists(os.path.dirname(dest_file)):
|
||||
@@ -1655,4 +1699,15 @@
|
||||
self.logger.info('> Outputted %s to %s', in_class.ljust(35), outpathlk[side])
|
||||
except IOError:
|
||||
self.logger.error('* File %s copy failed', in_class)
|
||||
|
||||
-
|
||||
+ elif os.path.isfile(cmn_file):
|
||||
+ if not os.path.exists(os.path.dirname(dest_file)):
|
||||
+ os.makedirs(os.path.dirname(dest_file))
|
||||
+ try:
|
||||
+ shutil.copyfile(cmn_file, dest_file)
|
||||
+ self.logger.info('> Outputted %s to %s', in_class.ljust(35), outpathlk[side])
|
||||
+ except IOError:
|
||||
+ self.logger.error('* File %s copy failed', in_class)
|
||||
+
|
||||
+def commands_sanity_check():
|
||||
+ print 'Commands patch applied successfully'
|
||||
+
|
||||
Reference in new issue
Block a user