Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #383 from scikit-hep/issue-382
Browse files Browse the repository at this point in the history
Addresses #382.
  • Loading branch information
jpivarski committed Oct 21, 2019
2 parents eb5d886 + 18eff94 commit 9cbbf08
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion uproot/rootio.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def open(path, localsource=MemmapSource.defaults, xrootdsource=XRootDSource.defa

parsed = urlparse(path)
if _bytesid(parsed.scheme) == b"file" or len(parsed.scheme) == 0 or (os.name == "nt" and open._windows_absolute.match(path) is not None):
path = parsed.netloc + parsed.path
if not (os.name == "nt" and open._windows_absolute.match(path) is not None):
path = parsed.netloc + parsed.path
if isinstance(localsource, dict):
kwargs = dict(MemmapSource.defaults)
kwargs.update(localsource)
Expand Down
6 changes: 4 additions & 2 deletions uproot/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ def _filename_explode(x):
if isinstance(x, pathlib.Path):
x = str(x)
parsed = urlparse(x)
if _bytesid(parsed.scheme) == b"file" or len(parsed.scheme) == 0 or (os.name == "nt" and open._windows_absolute.match(x) is not None):
pattern = os.path.expanduser(parsed.netloc + parsed.path)
if _bytesid(parsed.scheme) == b"file" or len(parsed.scheme) == 0 or (os.name == "nt" and _filename_explode._windows_absolute.match(x) is not None):
if not (os.name == "nt" and _filename_explode._windows_absolute.match(x) is not None):
path = parsed.netloc + parsed.path
pattern = os.path.expanduser(path)
if "*" in pattern or "?" in pattern or "[" in pattern:
out = sorted(glob.glob(pattern))
if len(out) == 0:
Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import re

__version__ = "3.10.7"
__version__ = "3.10.8"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 9cbbf08

Please sign in to comment.