braveclojure / cftbat-code

394 stars 100 forks source link

the-divine-cheese-code for windows #11

Open eskemojoe007 opened 5 years ago

eskemojoe007 commented 5 years ago

On windows the supplied url function doesn't provide the proper url since windows returns with \ instead of other systems and browsers that need /. Its a simple fix however that I at least wanted to mention here.

(defn url
  [filename]
  (s/replace (str "file:///"
              (System/getProperty "user.dir")
              "/"
              filename)
             #"\\" "/"))