MATLAB: Uipickfiles Error with R2015b

MATLABuipickfiles

Hi, I just upgraded from R2013a to R2015b. One of the key components in the data analysis script I have is selecting the file I want first. I have uipickfiles.m outputting the structure data type. The GUI part seems to run fine, but the issue is when I execute it in R2015b it returns a structure of all the files in my current folder, and then in the last position, the file I actually picked (which is from a completely different directory). I can't tell why it's including everything from the 'current folder' directory.
As an aside, you can get around this by having the output set to 'Char,' and then each row is a different file name, and only includes the ones you select. But nonetheless, I don't like it when things stop working after a revision upgrade.

Best Answer

I was able to find a fix the author mentioned in the ratings section of the link Jan provided. The reason for the failure and its fix is as follows:
"They changed the behavior of dir again (slightly). You can fix the problem just by changing one line. Change the line (on or near line 186)
dir_picks = dir(' '); % Create empty directory structure.

to be
dir_picks = repmat(dir(char(127)),0,1); % Create empty directory structure.
and that will work forever (I hope!)."
I can confirm that this fix worked for me.