Arc Forumnew | comments | leaders | submitlogin
Subdirectories under static/
1 point by lark 4938 days ago | 4 comments
It seems Arc won't recognize directory structure under static/.

This makes it impossible to host and include Javascript libraries. I'm guessing I'm missing something here, so how can this be done?



1 point by akkartik 4938 days ago | link

Are you trying to store javascript files under say static/javascripts? Arc doesn't really support nested directory structures at all.

Edit: I've fixed it for static files: http://github.com/nex3/arc/commit/1f6972d2db.

I'm not sure why it was disallowing '/' in paths; the only reason I could think of was security, so I've disallowed '..' instead. I'm pretty sure there are angles here I haven't thought of, so use at your own risk :)

-----

1 point by zck 4938 days ago | link

A quick thought: on Linux, '/' is the root directory, similarly to "C:\" on Windows. Perhaps this was the reason it's verboten. An opening slash should either be disallowed, or treated as a relative link.

-----

2 points by akkartik 4938 days ago | link

static-filetype always gets a path that is appended to staticdir, so you don't have to worry about absolute paths.

-----

1 point by zck 4937 days ago | link

Well, then I'm stuffed. Disallowing .. makes perfect sense, though.

-----