From fc88eef10cdd04c362d45b162d98c29ab71623c8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 13 Aug 2024 11:57:25 +0200 Subject: [PATCH] Support URLs on Windows --- torchgeo/datasets/geo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchgeo/datasets/geo.py b/torchgeo/datasets/geo.py index d03d661a1e8..b784b06af73 100644 --- a/torchgeo/datasets/geo.py +++ b/torchgeo/datasets/geo.py @@ -313,7 +313,7 @@ def files(self) -> list[Path]: files |= set(glob.iglob(pathname, recursive=True)) elif ( os.path.isfile(path) - and fnmatch.fnmatch(path, os.path.join('*', self.filename_glob)) + and fnmatch.fnmatch(path, f'*{self.filename_glob}') or path_is_vsi(path) ): files.add(path)