Scenario:
I'm compiling a project which uses a lot of external files\functions.
When I compile, I use a function which includes all of said files into the mcc command with the '-a' argument.
Everything seems to be in place and working fine after compilation, EXCEPT one text file - in which case, Matlab seem to include a text file (with the same name) from an earlier iteration of the project (I can tell, because the text in the file is different).
Some more details:
When I include the external files, I do so by adding the paths of all the sub-folders residing in the directory of the project.
After compilation is done, all of said paths are removed from Matlab's paths.
No paths other than Matlab's default paths are added before and after compilation.
When I run the project from the .m file, the correct text file is used, but after compilation, the wrong one is used.