Skip to content

Commit

Permalink
Added support for UNC paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tminka committed Jun 7, 2017
1 parent 49cc8c7 commit bea270f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion glob.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@
end
% special case for absolute paths
if pattern(1) == '/'
prefix = '/';
if pattern(2) == '/'
% special case for UNC paths
prefix = ['//' first '/'];
[first,rest] = strtok(rest,'/');
if ~isempty(rest)
rest = rest(2:end);
end
else
prefix = '/';
end
end
% absolute path tests:
% glob('/*.sys')
Expand Down

0 comments on commit bea270f

Please sign in to comment.