Skip to content

Commit 70cc64a

Browse files
committed
remove is_url for speed
1 parent 063f2b6 commit 70cc64a

File tree

11 files changed

+1
-25
lines changed

11 files changed

+1
-25
lines changed

+stdlib/absolute.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
c = "";
2727

28-
if stdlib.is_url(p), return; end
29-
3028
if expand_tilde
3129
c = stdlib.expanduser(p);
3230
else

+stdlib/canonical.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
c = "";
2222

23-
if stdlib.is_url(p), return; end
24-
2523
if expand_tilde
2624
e = stdlib.expanduser(p);
2725
else

+stdlib/expanduser.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
e = "";
1616

17-
if stdlib.is_url(p), return; end
18-
1917
e = stdlib.drop_slash(p);
2018

2119
L = stdlib.len(e);

+stdlib/is_absolute.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
y = false;
1515

16-
if stdlib.is_url(p), return, end
17-
1816
L = stdlib.len(p);
1917
if ~L || (ispc && L < 3)
2018
return

+stdlib/normalize.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
end
1818

1919
n = stdlib.posix(p);
20-
if ~stdlib.len(n) && stdlib.is_url(p), return, end
2120

2221
uncslash = ispc && startsWith(n, "//");
2322

+stdlib/parent.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
p = stdlib.drop_slash(pth);
1616

1717
if ~stdlib.len(p)
18-
if ~stdlib.is_url(pth)
19-
p = ".";
20-
end
2118
return
2219
elseif is_root_stub(p)
2320
% 2 or 3 char drive letter

+stdlib/posix.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
p (1,1) string
99
end
1010

11-
r = "";
12-
if stdlib.is_url(p), return, end
13-
1411
if ispc
1512
r = strrep(p, '\', '/');
1613
else

+stdlib/root_name.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
r = "";
1414

15-
if ~ispc || stdlib.len(p) < 2 || stdlib.is_url(p), return, end
15+
if ~ispc || stdlib.len(p) < 2, return, end
1616

1717
if ischar(p)
1818
if p(2) == ':' && isletter(p(1)) %#ok<UNRCH>

+stdlib/windows_shortname.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
p (1,1) string
1515
end
1616

17-
s = "";
18-
if stdlib.is_url(p), return, end
19-
2017
s = p;
2118
if ispc
2219
fso = actxserver('Scripting.FileSystemObject');

src/pure.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ bool fs_is_windows()
3838

3939
std::string fs_as_posix(std::string_view path)
4040
{
41-
if (fs_is_url(path))
42-
return {};
43-
4441
std::filesystem::path p(path);
4542

4643
return p.generic_string();

0 commit comments

Comments
 (0)