Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created July 1, 2023 00:43
Show Gist options
  • Save MasterDuke17/1e92035ebf637d98b618e6a062a83de2 to your computer and use it in GitHub Desktop.
Save MasterDuke17/1e92035ebf637d98b618e6a062a83de2 to your computer and use it in GitHub Desktop.
diff --git src/core.c/Rakudo/Internals.pm6 src/core.c/Rakudo/Internals.pm6
index 3840a271c..b05343902 100644
--- src/core.c/Rakudo/Internals.pm6
+++ src/core.c/Rakudo/Internals.pm6
@@ -1388,11 +1388,11 @@ method pull-one()
(try
nqp::if(
$!file.ACCEPTS($entry) &&
- nqp::stat($path,nqp::const::STAT_ISREG),
+ (my $s := nqp::dispatch('boot-syscall', 'file-stat', nqp::decont_s($path), 0)) && nqp::dispatch('boot-syscall', 'stat-is-reg', $s),
(return $path),
nqp::if(
$!dir.ACCEPTS($entry) &&
- nqp::stat($path,nqp::const::STAT_ISDIR),
+ nqp::dispatch('boot-syscall', 'stat-is-dir', $s),
nqp::stmts(
nqp::if(
nqp::fileislink($path),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment