Closed fdsteffen closed 3 years ago
Oops..
Yes indeed, s.movie_file
returns a relative path when importing test projects (stored in the source\routines directory
).
I used this trick to allow testing on different machines, but did not think it completely through apparently.
I've just introduced a istestfile
function in MASH-FRET-1.3.2 to control the origin of the project, such as:
if ~isempty(s.movie_file) && istestfile(s.movie_file)
s.movie_file = which(s.movie_file); % get machine-dependent path for test files
end
It works for me.
Thank you very much for nailing the bug!
Yes, it works, thanks! I will close this then.
The movie files are no longer loaded in the trace processing module (on master it worked up to commit 4822172). I tracked the issue down to the following lines in checkField.m
The which() function returns an empty string if the file is neither in the current path nor on the Matlab path. In my case the
s.movie_file
was already a full path and the issue is resolved by commenting out the if..else statement. Is there any scenario where thes.movie_file
returns a relative path that would need to be solved by which()?