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 dee7e14 commit 366ae5bCopy full SHA for 366ae5b
nbgrader/coursedir.py
@@ -1,5 +1,6 @@
1
import os
2
import re
3
+import sys
4
import datetime
5
import typing
6
from pathlib import Path
@@ -367,6 +368,10 @@ def find_assignments(self,
367
368
# Convert to a Path and back to a string to remove any instances of `/.`
369
pattern = str(Path(self.directory_structure.format(**pattern_args)))
370
371
+ if sys.platform == 'win32':
372
+ # Escape backslashes on Windows
373
+ pattern = pattern.replace('\\', r'\\')
374
+
375
for dir in dirs:
376
match = re.match(pattern, str(dir.relative_to(self.root)))
377
if match:
0 commit comments