cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1200991 - /cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
Date Fri, 11 Nov 2011 17:45:12 GMT
Author: slebresne
Date: Fri Nov 11 17:45:11 2011
New Revision: 1200991

URL: http://svn.apache.org/viewvc?rev=1200991&view=rev
Log:
Fix pattern for windows for CASSANDRA-3456

Modified:
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java?rev=1200991&r1=1200990&r2=1200991&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
Fri Nov 11 17:45:11 2011
@@ -22,6 +22,7 @@ package org.apache.cassandra.io.sstable;
 import java.io.*;
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.regex.Pattern;
 
 import com.google.common.collect.Sets;
 
@@ -339,7 +340,7 @@ public class SSTableWriter extends SSTab
         SequentialWriter out = SequentialWriter.open(new File(descriptor.filenameFor(SSTable.COMPONENT_DIGEST)),
true);
         // Writting output compatible with sha1sum
         Descriptor newdesc = descriptor.asTemporary(false);
-        String[] tmp = newdesc.filenameFor(SSTable.COMPONENT_DATA).split(new Character(File.separatorChar).toString());
+        String[] tmp = newdesc.filenameFor(SSTable.COMPONENT_DATA).split(Pattern.quote(File.separator));
         String dataFileName = tmp[tmp.length - 1];
         out.write(String.format("%s  %s", Hex.bytesToHex(digest), dataFileName).getBytes());
         out.close();



Mime
View raw message