cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [1/3] cassandra git commit: Remove incorrect file separator in CommitLogArchiver on Windows
Date Wed, 12 Aug 2015 16:22:32 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 117d667fc -> 095de832d


Remove incorrect file separator in CommitLogArchiver on Windows

Patch by jmckenzie; reviewed by pmotta for CASSANDRA-9897


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5c88651a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5c88651a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5c88651a

Branch: refs/heads/trunk
Commit: 5c88651a41c55b2ee2c3b387e92b1864386df46c
Parents: fec40fd
Author: Joshua McKenzie <jmckenzie@apache.org>
Authored: Wed Aug 12 12:20:57 2015 -0400
Committer: Joshua McKenzie <jmckenzie@apache.org>
Committed: Wed Aug 12 12:20:57 2015 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c88651a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
index 02072de..c25a740 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
@@ -124,6 +124,9 @@ public class CommitLogArchiver
             {
                 segment.waitForFinalSync();
                 String command = archiveCommand.replace("%name", segment.getName());
+                // We need to swap out / with the os-specific separator in the event someone
provided an incorrect value
+                if (FBUtilities.isWindows())
+                    archiveCommand.replace('/', File.separatorChar);
                 command = command.replace("%path", segment.getPath());
                 exec(command);
             }


Mime
View raw message