Skip to content

Commit 30bafdd

Browse files
committed
matlab < R2020b compatible
1 parent f89fcc4 commit 30bafdd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

+stdlib/+fileio/path_tail.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
import stdlib.fileio.absolute_path
1010

11+
if isempty(apath)
12+
last = string.empty;
13+
return
14+
end
15+
1116
if strlength(apath) == 0
1217
last = "";
1318
return

+stdlib/+fileio/with_suffix.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
suffix (1,1) string
1212
end
1313

14+
if isempty(filename)
15+
return
16+
end
17+
1418
[direc, name, ext] = fileparts(filename);
1519
if ext ~= suffix
1620
filename = fullfile(direc, name + suffix);

0 commit comments

Comments
 (0)