File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -128,20 +128,21 @@ def x_path(file):
128128 ''' Return external path (relative to self.path) for file '''
129129 return '%s/%s' % (dirname (self .path ), basename (file ))
130130
131- # Copy instrument file to cwd if not already there (for compatibility)
132- if not isfile (basename (self .path )):
133- shutil .copy2 (self .path , "." ) # also copies stat information
134-
135131 # Create the path for the binary
136132 if os .name == 'nt' :
137133 self .binpath = '%s.%s' % (self .name , mccode_config .platform ['EXESUFFIX' ])
138134 else :
139135 self .binpath = './%s.%s' % (self .name , mccode_config .platform ['EXESUFFIX' ])
140136
141137 # Check if self.path is .exe or .out binary, if so - skip ahead to execution
142- if pathlib .Path (self .path ).suffix == mccode_config .platform ['EXESUFFIX' ]:
138+ if self .path == basename (self .binpath ):
139+ LOG .info ('Called with binary file %s, skipping ahead to execution' , self .binpath )
143140 return
144141
142+ # Copy instrument file to cwd if not already there (for compatibility)
143+ if not isfile (basename (self .path )):
144+ shutil .copy2 (self .path , "." ) # also copies stat information
145+
145146 # Check if c-code should be regenerated by comparing to instr timestamp
146147 existingC = findReusableFile (self .path ,
147148 [self .cpath , x_path (self .cpath )])
You can’t perform that action at this time.
0 commit comments