There was an error while loading. Please reload this page.
1 parent a171125 commit 03eee2dCopy full SHA for 03eee2d
1 file changed
widgets/+wt/+utility/resolveFilePath.m
@@ -97,13 +97,17 @@
97
98
99
%% Finally, check the MATLAB path
100
-if isfile(fileName)
101
102
- % Use WHICH to locate the file
103
- filePath = which(fileName);
104
- return
+% Use WHICH to locate the file
+filePath = which(fileName);
105
106
-else
+% Ensure a string scalar
+filePath = string(filePath);
+
107
108
+%% Was it found?
109
110
+if ~isfile(filePath)
111
112
% Unable to find the file. Throw a warning.
113
id = "resolvePathFromFileName:NotFound";
@@ -112,6 +116,5 @@
116
117
% Return the original path
114
118
filePath = fileName;
115
119
120
end %if
0 commit comments