The string check will not prevent log-dir/../../../../etc/passwd I don't think.

Can we try something like this?
```
(let [file (.getCanonicalFile (File. LOG-DIR fname))
      path (.getCanonicalPath file)]
    (if (= (File. LOG-DIR) (.getParentFile file))
```

Indentation looks a little weird too, after the if was added.  Not sure if that's a tabs vs. spaces issue.