deal with files in separated directories
There is a bug which is related to several files that are existed in separated directories.
suppose that there are two files in src directory and one file in include directory which we want to analyze with promise. This is the "files" section in promise.yml:
files: src/hs_operator.cc,src/test_hs_operator_f.cc,include/hs_operator.h
After compiling I get this error:
Traceback (most recent call last):
File "/home/sara/.virtualenv/promise2/bin/runPromise", line 11, in <module>
load_entry_point('cadnaPromise==2.0', 'console_scripts', 'runPromise')()
File "/home/sara/.virtualenv/promise2/lib/python3.6/site-packages/cadnaPromise-2.0-py3.6.egg/cadnaPromise/runPromise.py", line 113, in runPromise
pr.compileAndRun(tempPath, cadna=True)
File "/home/sara/.virtualenv/promise2/lib/python3.6/site-packages/cadnaPromise-2.0-py3.6.egg/cadnaPromise/Promise.py", line 229, in compileAndRun
f.createFile(self._types, dest, prefix='withoutcadna_' if cadna else '', promiseHeader=(i != 0))
File "/home/sara/.virtualenv/promise2/lib/python3.6/site-packages/cadnaPromise-2.0-py3.6.egg/cadnaPromise/PrFile.py", line 340, in createFile
with open(join(path, prefix + self._fileName), "w") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpwx1o4i0k/withoutcadna_src/hs_operator.cc'
It is because that in PrFile.py line 340 it concatenates prefix "withoutcadna" to the file name which results in "withoutcadna_src/hs_operator.cc".