Skip to content

Commit d9337fa

Browse files
authored
Merge pull request #374 from kuretchi/rust-allow-non-existent-src-path
Allow non-existent `src_path`s
2 parents 2d8a208 + 5984a36 commit d9337fa

File tree

1 file changed

+2
-1
lines changed
  • onlinejudge_verify/languages

1 file changed

+2
-1
lines changed

onlinejudge_verify/languages/rust.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ def _find_target(
363363
for package in metadata['packages']:
364364
for target in package['targets']:
365365
# A `src_path` may contain `..`
366-
if pathlib.Path(target['src_path']).resolve(strict=True) == src_path:
366+
# The path may not actually exist by being excluded from the package.
367+
if pathlib.Path(target['src_path']).resolve() == src_path:
367368
return package, target
368369
return None
369370

0 commit comments

Comments
 (0)