You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/02/03 18:10:03 UTC
[2/4] storm git commit: STORM-635. logviewer returns 404 if
storm_home/logs is a symlinked dir.
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 <ha...@hortonworks.com>
Authored: Thu Jan 22 10:35:41 2015 -0800
Committer: Sriharsha Chintalapani <ha...@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)