Github user d2r commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/91#discussion_r12062437
--- Diff: storm-core/src/clj/backtype/storm/daemon/logviewer.clj ---
@@ -30,19 +30,22 @@
[clojure.string :as string])
(:gen-class))
-(defn tail-file [path tail]
+(defn tail-file [path tail root-dir]
(let [flen (.length (clojure.java.io/file path))
- skip (- flen tail)]
+ skip (- flen tail)
+ log-dir (File. root-dir)
+ log-file (File. path)]
+ (if (= log-dir (.getParentFile log-file))
(with-open [input (clojure.java.io/input-stream path)
output (java.io.ByteArrayOutputStream.)]
(if (> skip 0) (.skip input skip))
--- End diff --
Tiny thing: looks like `(with-open` and following two lines need
indentation too.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---