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

조회 수: 10 (최근 30일)
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

채택된 답변

Matthew Corner
Matthew Corner 2019년 10월 10일
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
Stephen23
Stephen23 2019년 10월 10일
Also: "Class, package, private, and resources folders are special folders that cannot be specified explicitly as part of the search path."
Steven Lord
Steven Lord 2019년 10월 10일
You can see the specific Release Note entry Matthew Corner quoted using this search.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by