Skip to content

Commit 3c5849c

Browse files
committed
canonical: remove redundant check'
1 parent 3154a59 commit 3c5849c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

+stdlib/canonical.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
strict = false;
1818
end
1919

20-
if stdlib.strempty(file)
21-
c = extractBefore(file, 1);
22-
return
23-
end
24-
2520
[s, r] = fileAttribCompatible(file);
2621

2722
if s == 1
2823
c = r.Name;
2924
elseif ~strict
3025
c = stdlib.normalize(file);
3126
else
32-
c = extractBefore(file, 1);
27+
c = '';
28+
end
29+
30+
if isstring(file)
31+
c = string(c);
3332
end
3433

3534
end

0 commit comments

Comments
 (0)