aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorLordMZTE <lord@mzte.de>2022-07-01 15:08:56 +0200
committerVeikka Tuominen <git@vexu.eu>2022-07-27 18:17:07 +0300
commit8c4896fb3a44d3b8025f66db7615483c30bed2b1 (patch)
tree60e84b3630e5d0201026ce82da621372d3aef23e /src/Module.zig
parent1110eafe9bd19ff69e9a7e488a7e9613fa909aeb (diff)
downloadzig-8c4896fb3a44d3b8025f66db7615483c30bed2b1.tar.gz
zig-8c4896fb3a44d3b8025f66db7615483c30bed2b1.zip
Module: use path.isSep
Co-authored-by: Veikka Tuominen <git@vexu.eu>
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 85cc0f14b9..688a7e5a30 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -4697,7 +4697,7 @@ pub fn importFile(
if (!mem.startsWith(u8, resolved_path, resolved_root_path) or
// This prevents this check from triggering when the name of the
// imported file starts with the root path's directory name.
- mem.indexOfAny(u8, &.{resolved_path[resolved_root_path.len]}, "/\\") == null)
+ std.fs.path.isSep(resolved_path[resolved_root_path.len]))
{
return error.ImportOutsidePkgPath;
}