Skip to content

Commit

Permalink
Address issue 15 and try to normalize the filename. Needs testing on …
Browse files Browse the repository at this point in the history
…cygwin before I can call this fixed.
  • Loading branch information
rogerallen committed Sep 1, 2013
1 parent 1d60a45 commit 3c4dd81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject shadertone "0.3.0-SNAPSHOT"
(defproject shadertone "0.2.1-SNAPSHOT"
:description "A clojure library designed to mix musical synthesis via Overtone and dynamic visuals a la www.shadertoy.com"
:url "http://github.com/overtone/shadertone"
:license {:name "MIT License"
Expand Down
6 changes: 6 additions & 0 deletions src/shadertone/shader.clj
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,12 @@
(let [is-filename (not (instance? clojure.lang.Atom shader-filename-or-str-atom))
shader-filename (if is-filename
shader-filename-or-str-atom)
;; Fix for issue 15. Normalize the given shader-filename to the
;; path separators that the system will use. If user gives path/to/shader.glsl
;; and windows returns this as path\to\shader.glsl from .getPath, this
;; change should make comparison to path\to\shader.glsl work.
shader-filename (if (and is-filename (not (nil? shader-filename)))
(.getPath (File. shader-filename)))
shader-str-atom (if-not is-filename
shader-filename-or-str-atom
(atom nil))
Expand Down

0 comments on commit 3c4dd81

Please sign in to comment.