MATLAB: Does “addpath” change Windows short paths to full paths in MATLAB R2018a

addpathMATLABshortpath

When I give a Windows short path to "addpath" in MATLAB R2018a, it adds the full path to the MATLAB search path instead of the short path. In MATLAB R2017b and earlier versions, it added the short path.
For example, in MATLAB R2018a the following commands to add 'C:\Program Files\test\test.m' to the path:
>> addpath('C:\Progra~1\test')
>> which('test.m')
shows:
C:\Program Files\test\test.m
While the same commands in MATLAB R2017b shows:
C:\Progra~1\test\test.m
Why is the short path itself no longer added?

Best Answer

This change was made to avoid having multiple entries on the MATLAB search path for the same folder (i.e. both the short path and the full path for the same folder). All paths are now resolved to the full path before being added to the search path.
You can read more about this change in the release notes for MATLAB R2018a: