Skip to content

Commit

Permalink
glob fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tebeka committed Jan 15, 2011
1 parent a16fe0c commit 442cbf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@
(let [[c j] stream]
(cond
(nil? c) (re-pattern
; We add ^ to the regexp since we check only for file names
(str "^" (if (= \. (first s)) "" "(?=[^\\.])") re))
; We add ^ and $ since we check only for file names
(str "^" (if (= \. (first s)) "" "(?=[^\\.])") re "$"))
(= c \\) (recur (nnext stream) (str re c c) curly-depth)
(= c \/) (recur (next stream) (str re (if (= \. j) c "/(?=[^\\.])"))
curly-depth)
Expand Down

0 comments on commit 442cbf3

Please sign in to comment.