fix symlinks to data dir not working; patch by yukim reviewed by jbellis for CASSANDRA-5185
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7752f018 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7752f018 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7752f018 Branch: refs/heads/trunk Commit: 7752f018b1cf4bbc03db77e251cd6272356087a9 Parents: f4a941e Author: Yuki Morishita <yu...@apache.org> Authored: Fri Jan 25 10:36:58 2013 -0600 Committer: Yuki Morishita <yu...@apache.org> Committed: Fri Jan 25 15:41:49 2013 -0600 ---------------------------------------------------------------------- CHANGES.txt | 3 +++ src/java/org/apache/cassandra/db/Directories.java | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7752f018/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 3696ca6..3a4ebe7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +1.2.2 + * fix symlinks under data dir not working (CASSANDRA-5185) + 1.2.1 * stream undelivered hints on decommission (CASSANDRA-5128) * GossipingPropertyFileSnitch loads saved dc/rack info if needed (CASSANDRA-5133) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7752f018/src/java/org/apache/cassandra/db/Directories.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/Directories.java b/src/java/org/apache/cassandra/db/Directories.java index bf1b695..f1db5ed 100644 --- a/src/java/org/apache/cassandra/db/Directories.java +++ b/src/java/org/apache/cassandra/db/Directories.java @@ -126,7 +126,7 @@ public class Directories { for (File dir : sstableDirectories) { - if (FileUtils.getCanonicalPath(dir).startsWith(FileUtils.getCanonicalPath(dataDirectory))) + if (dir.getAbsolutePath().startsWith(dataDirectory.getAbsolutePath())) return dir; } return null;