sinisterchipmunk / jax

Framework for creating rich WebGL-enabled applications using JavaScript and Ruby
http://jaxgl.com
MIT License
96 stars 16 forks source link

Destroying shaders does not remove its directory #50

Closed sinisterchipmunk closed 12 years ago

sinisterchipmunk commented 12 years ago
$ jax generage shader whatever
$ jax destroy shader whatever
$ ls app/assets/jax/shaders/
    whatever

The problem: Jax creates shaders by searching for a matching directory structure. So, though the shader has been removed, Jax is still trying to initialize a shader called Whatever. Since the material file has been deleted, this fails most spectacularly.

Jax should destroy the directory, but it should also fail more gracefully when a directory exists but its corresponding support files do not.

sinisterchipmunk commented 12 years ago

I couldn't make Jax barf on this error, even though it does still leave empty shader directories behind. I'm assuming the graceful recovery was accidentally implemented sometime after this ticket was opened.