Open jpfeuffer opened 5 years ago
Either try to fix the path before passing to Comet or write the Comet guys.
on first sight, we pass the arguments quoted, i.e. "C:\Program Files\OpenMS-2.4.0\share\OpenMS\THIRDPARTY\Comet/comet.exe" -P"C:\TEMP\with space\20190528_093217_ukkonen_6624_2\param.txt" "-NC:\TEMP\with space\20190528_093217_ukkonen_6624_2\result" C:/dev/openmsqt5/src/tests/topp/THIRDPARTY/CometAdapter_3.mzML
still yields
Comet version 2016.01 rev. 3
Error - cannot open parameter file "C:\TEMP\with".
ok, seems the comet guys should revisit their code:
at https://sourceforge.net/p/comet-ms/code/HEAD/tree/trunk/comet-ms/Comet.cpp#l124 the argument
"-PC:\TEMP\with space\20190528_093217_ukkonen_6624_2\param.txt"
is parsed (as char* arg
), and then a string is extracted via sscanf (which stops at the first whitespace).
Solution: just remove the first two characters, i.e. -P
, and treat the remaining string as filename.
This also needs to be done for all other arguments, e.g. -N
, which uses the same mechanism.
all we can do is check the filenames and quit with a better error message... not sure its worth the trouble though, because we'd need to check the comet version and stop doing this when the bug is fixed on their side...
posted as issue on the Comet ticket system: https://groups.google.com/forum/#!topic/comet-ms/lTGA76ul1pk
Confirmed: If your tmp path has space (e.g. because it is in your user folder and your username has spaces) Comet has problems reading the temporary param file since it does not handle spaces correctly.