/gist:a7f69bb57820a9e5ce88 Secret
Created
June 23, 2013 14:38
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 09bdebea39106ad7e69aa6876f4ad801c530e819 Mon Sep 17 00:00:00 2001 | |
| From: Timo Paulssen <timonator@perpetuum-immobile.de> | |
| Date: Sun, 23 Jun 2013 16:37:56 +0200 | |
| Subject: [PATCH] make sure not to endlessly recurse into the same directory | |
| --- | |
| bin/ufo | 1 + | |
| 1 file changed, 1 insertion(+) | |
| diff --git a/bin/ufo b/bin/ufo | |
| index d32d777..e216973 100755 | |
| --- a/bin/ufo | |
| +++ b/bin/ufo | |
| @@ -185,6 +185,7 @@ sub find-file-by-ext(@dirs, *@ext) { | |
| sub dirwalk(Str $dir = '.', Mu :$d = none(<. ..>), Mu :$f = *, :&dx = -> $ {}, :&fx = -> $ {}) { | |
| for dir($dir, :test(*)) -> $p { | |
| + when $p ~~ /['/..'$|^$dir$]/ { } | |
| when $p.f { | |
| fx($p.path) if $p.path ~~ $f | |
| } | |
| -- | |
| 1.8.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment