Permalink
Browse files

Merge pull request #1 from liquidz/master

Support no extention file and directory
  • Loading branch information...
2 parents 1616119 + 6780a43 commit 622452d4ae6a2ad28ec2378f25f4d9ce6bed2f55 @ibdknox committed Mar 20, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/watchtower/core.clj
View
@@ -103,5 +103,6 @@
(let [exts-set (set (map name exts))]
(fn [f]
(let [fname (.getName f)
- cur (subs fname (inc (.lastIndexOf fname ".")))]
+ idx (.lastIndexOf fname ".")
+ cur (if-not (neg? idx) (subs fname (inc idx)))]
(exts-set cur)))))

0 comments on commit 622452d

Please sign in to comment.