Skip to content

Commit df3c02a

Browse files
committed
absolute('') = ''
1 parent 8945e7c commit df3c02a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

+stdlib/+fileio/absolute_path.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
% have to expand ~ first (like C++ filesystem::path::absolute)
88
abspath = stdlib.fileio.expanduser(p);
99

10-
if isempty(abspath)
10+
if isempty(abspath) || abspath == ""
1111
return
1212
end
1313

test/TestFilePure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function test_absolute_path(tc)
113113
import matlab.unittest.constraints.StartsWithSubstring
114114

115115
tc.verifyEmpty(stdlib.absolute_path(string.empty))
116-
tc.verifyEqual(stdlib.absolute_path(""), string(pwd))
116+
tc.verifyEqual(stdlib.absolute_path(""), "")
117117

118118
pabs = stdlib.absolute_path('2foo');
119119
pabs2 = stdlib.absolute_path('4foo');

0 commit comments

Comments
 (0)