Change in matlabpath() form R2018b to R2019b, forbidden path name "resources"

10 views (last 30 days)
Hello,
since R2019b we are no longer abel to add a foler named "resources" to the Matlab path:
E.g.
addpath('c:\temp\resources')
fails with the message:
Warning: Adding folders named 'resources' to the path is not supported.
In R2019b and before it was possible to do that, and I did not find a hint in the doucumentation that this may be changed in a future version. I can even not findt the hint that adding a folder named "resources" in the R2019b documentation.
This is quite anoying as we have this path name in usage and will create a lots of effort to change.
  • Is there any possibility to re-anabe the possibility to add paths ending with the name "resources" .
  • Are there more "forbidden" names?
Thanks, best
Alex

Accepted Answer

Matthew Corner
Matthew Corner on 10 Oct 2019
I believe this has become a reserved keyword for use by MATLAB projects.
Its listed in the 2019a release notes:
Starting in R2019a, the resources folder is a reserved folder, and folders with the name resources are not allowed on the MATLAB path. In previous releases, these folders were allowed on the MATLAB path.
If a folder named resources is specified when calling the addpath, userpath, or pathdef functions, MATLAB returns a warning and the folder is not added to the path. If you have a folder named resources, MATLAB is unable to run any of the contents of that folder, even if the resources folder is the current folder.
Rename all folders on the path named resources, and move any files you want to run in MATLAB out of folders named resources.
  2 Comments
Stephen23
Stephen23 on 10 Oct 2019
Also: "Class, package, private, and resources folders are special folders that cannot be specified explicitly as part of the search path."

Sign in to comment.

More Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Tags

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!