diff --git a/commands.patch b/commands.patch index 02e99508dc..6cdf9ca4e3 100644 --- a/commands.patch +++ b/commands.patch @@ -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' +