We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0f966e commit 103c33bCopy full SHA for 103c33b
nbgrader/coursedir.py
@@ -438,13 +438,13 @@ def find_notebooks(
438
for key, value in kwargs.items()
439
}
440
441
- # Convert to a Path and back to a string to remove any instances of `/.`
442
- pattern = str(Path(pattern.replace(".", r"\.").format(**pattern_args)))
443
-
+ # Escape backslashes on Windows before doing any other escaping
444
if sys.platform == 'win32':
445
- # Escape backslashes on Windows
446
pattern = pattern.replace('\\', r'\\')
447
+ # Convert to a Path and back to a string to remove any instances of `/.`
+ pattern = str(Path(pattern.replace(".", r"\.").format(**pattern_args)))
+
448
for file in files:
449
match = re.match(pattern, str(file.relative_to(self.root)))
450
if match:
0 commit comments