Permalink
Browse files

Remove contrib dependencies from r.m.file.

  • Loading branch information...
1 parent 34ef330 commit d5ddd79ab3a6bc045b65012cf68524eca2f87d8e @mmcgrana committed Oct 25, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 ring-core/src/ring/middleware/file.clj
@@ -1,7 +1,5 @@
(ns ring.middleware.file
"Static file serving."
- (:use [clojure.contrib.def :only (defvar-)]
- [clojure.contrib.except :only (throw-if-not)])
(:require [ring.util.codec :as codec]
[ring.util.response :as response])
(:import java.io.File))
@@ -10,7 +8,8 @@
"Ensures that a directory exists at the given path, throwing if one does not."
[^String dir-path]
(let [dir (File. dir-path)]
- (throw-if-not (.exists dir) "Directory does not exist: %s" dir-path)))
+ (if-not (.exists dir)
+ (throw (Exception. (format "Directory does not exist: %s" dir-path))))))
(defn wrap-file
"Wrap an app such that the directory at the given root-path is checked for a

0 comments on commit d5ddd79

Please sign in to comment.