storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [2/4] storm git commit: STORM-635. logviewer returns 404 if storm_home/logs is a symlinked dir.
Date Tue, 03 Feb 2015 17:10:03 GMT
STORM-635. logviewer returns 404 if storm_home/logs is a symlinked dir.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/516097ef
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/516097ef
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/516097ef

Branch: refs/heads/master
Commit: 516097efc72c79f2bad28585f413a78c10c6c9d5
Parents: bf9a311
Author: Sriharsha Chintalapani <harsha@hortonworks.com>
Authored: Thu Jan 22 10:35:41 2015 -0800
Committer: Sriharsha Chintalapani <harsha@hortonworks.com>
Committed: Thu Jan 22 10:35:41 2015 -0800

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/logviewer.clj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/516097ef/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
index f55a2d5..f2a5b0a 100644
--- a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
@@ -258,7 +258,9 @@ Note that if anything goes wrong, this will throw an Error and exit."
     (let [file (.getCanonicalFile (File. root-dir fname))
           file-length (.length file)
           path (.getCanonicalPath file)]
-      (if (.exists file)
+      (if (and (= (.getCanonicalFile (File. root-dir))
+                  (.getParentFile file))
+               (.exists file))
         (let [default-length 51200
               length (if length
                        (min 10485760 length)


Mime
View raw message