Skip to content

Commit 53509bb

Browse files
committed
fix regex
1 parent 3623201 commit 53509bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

repo2data/repo2data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ def _scan_dl_type(self):
323323
# (osf, google, datalad, git), then fall back to requests to download the file.
324324
if ((re.match(".*?(https://).*?", self._data_requirement_file["src"])
325325
or re.match(".*?(http://).*?", self._data_requirement_file["src"]))
326-
and not re.match(".*?(\\.git)", self._data_requirement_file["src"])
326+
and not re.match(".*?\\.git$", self._data_requirement_file["src"])
327327
and not re.match(".*?(drive\\.google\\.com).*?", self._data_requirement_file["src"])
328328
and not re.match(".*?(https://osf\\.io).*?", self._data_requirement_file["src"])):
329329
self._url_download()
330330
# if the source link has a .git, we use datalad
331-
elif re.match(".*?(\\.git)", self._data_requirement_file["src"]):
331+
elif re.match(".*?\\.git$", self._data_requirement_file["src"]):
332332
self._datalad_download()
333333
# or coming from google drive
334334
elif re.match(".*?(drive\\.google\\.com).*?", self._data_requirement_file["src"]):

0 commit comments

Comments
 (0)