Index: bin/cassandra-cli.bat
===================================================================
--- bin/cassandra-cli.bat	(revision 1026768)
+++ bin/cassandra-cli.bat	(working copy)
@@ -18,7 +18,7 @@
 @echo off
 if "%OS%" == "Windows_NT" setlocal
 
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED JAVA_HOME goto err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
Index: bin/json2sstable.bat
===================================================================
--- bin/json2sstable.bat	(revision 1026768)
+++ bin/json2sstable.bat	(working copy)
@@ -17,7 +17,7 @@
 @echo off
 if "%OS%" == "Windows_NT" setlocal
 
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
 if NOT DEFINED JAVA_HOME goto err
Index: bin/nodetool.bat
===================================================================
--- bin/nodetool.bat	(revision 1026768)
+++ bin/nodetool.bat	(working copy)
@@ -1,51 +1,51 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-@REM contributor license agreements. See the NOTICE file distributed with
-@REM this work for additional information regarding copyright ownership.
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-@REM (the "License"); you may not use this file except in compliance with
-@REM the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
-if NOT DEFINED JAVA_HOME goto err
-
-REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
-
-REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
-rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
-for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
-goto okClasspath
-
-:append
-set CLASSPATH=%CLASSPATH%;%1
-goto :eof
-
-:okClasspath
-REM Include the build\classes directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes
-goto runNodeTool
-
-:runNodeTool
-echo Starting NodeTool
-"%JAVA_HOME%\bin\java" -cp "%CASSANDRA_CLASSPATH%" -Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd %*
-goto finally
-
-:err
-echo The JAVA_HOME environment variable must be set to run this program!
-pause
-
-:finally
-
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
+@REM contributor license agreements. See the NOTICE file distributed with
+@REM this work for additional information regarding copyright ownership.
+@REM The ASF licenses this file to You under the Apache License, Version 2.0
+@REM (the "License"); you may not use this file except in compliance with
+@REM the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
+if NOT DEFINED JAVA_HOME goto err
+
+REM Ensure that any user defined CLASSPATH variables are not used on startup
+set CLASSPATH=%CASSANDRA_HOME%\conf
+
+REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
+rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;%1
+goto :eof
+
+:okClasspath
+REM Include the build\classes directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes
+goto runNodeTool
+
+:runNodeTool
+echo Starting NodeTool
+"%JAVA_HOME%\bin\java" -cp "%CASSANDRA_CLASSPATH%" -Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd %*
+goto finally
+
+:err
+echo The JAVA_HOME environment variable must be set to run this program!
+pause
+
+:finally
+
 ENDLOCAL
\ No newline at end of file
Index: bin/sstable2json.bat
===================================================================
--- bin/sstable2json.bat	(revision 1026768)
+++ bin/sstable2json.bat	(working copy)
@@ -1,68 +1,68 @@
-@REM
-@REM  Licensed to the Apache Software Foundation (ASF) under one or more
-@REM  contributor license agreements.  See the NOTICE file distributed with
-@REM  this work for additional information regarding copyright ownership.
-@REM  The ASF licenses this file to You under the Apache License, Version 2.0
-@REM  (the "License"); you may not use this file except in compliance with
-@REM  the License.  You may obtain a copy of the License at
-@REM
-@REM      http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM  Unless required by applicable law or agreed to in writing, software
-@REM  distributed under the License is distributed on an "AS IS" BASIS,
-@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM  See the License for the specific language governing permissions and
-@REM  limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
-if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto err
-
-REM ***** JAVA options *****
-set JAVA_OPTS=^
- -Dlog4j.configuration=log4j-tools.properties
-
-REM ***** CLASSPATH library setting *****
-
-REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
-
-REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
-goto okClasspath
-
-:append
-set CLASSPATH=%CLASSPATH%;%1%2
-goto :eof
-
-:okClasspath
-REM Include the build\classes directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes;%CASSANDRA_CONF%
-
-set CASSANDRA_PARAMS=
-set TOOLS_PARAMS=
-
-FOR %%A IN (%*) DO call :appendToolsParams %%A
-
-goto runTool
-
-:appendToolsParams
-set TOOLS_PARAMS=%TOOLS_PARAMS% %1
-goto :eof
-
-:runTool
-echo "%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp "%CASSANDRA_CLASSPATH%" "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
-"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp "%CASSANDRA_CLASSPATH%" "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
-goto finally
-
-:err
-echo JAVA_HOME environment variable must be set!
-pause
-
-:finally
-
-ENDLOCAL
+@REM
+@REM  Licensed to the Apache Software Foundation (ASF) under one or more
+@REM  contributor license agreements.  See the NOTICE file distributed with
+@REM  this work for additional information regarding copyright ownership.
+@REM  The ASF licenses this file to You under the Apache License, Version 2.0
+@REM  (the "License"); you may not use this file except in compliance with
+@REM  the License.  You may obtain a copy of the License at
+@REM
+@REM      http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM  Unless required by applicable law or agreed to in writing, software
+@REM  distributed under the License is distributed on an "AS IS" BASIS,
+@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM  See the License for the specific language governing permissions and
+@REM  limitations under the License.
+
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
+if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
+if NOT DEFINED JAVA_HOME goto err
+
+REM ***** JAVA options *****
+set JAVA_OPTS=^
+ -Dlog4j.configuration=log4j-tools.properties
+
+REM ***** CLASSPATH library setting *****
+
+REM Ensure that any user defined CLASSPATH variables are not used on startup
+set CLASSPATH=%CASSANDRA_HOME%\conf
+
+REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;%1%2
+goto :eof
+
+:okClasspath
+REM Include the build\classes directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes;%CASSANDRA_CONF%
+
+set CASSANDRA_PARAMS=
+set TOOLS_PARAMS=
+
+FOR %%A IN (%*) DO call :appendToolsParams %%A
+
+goto runTool
+
+:appendToolsParams
+set TOOLS_PARAMS=%TOOLS_PARAMS% %1
+goto :eof
+
+:runTool
+echo "%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp "%CASSANDRA_CLASSPATH%" "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp "%CASSANDRA_CLASSPATH%" "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
+goto finally
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+:finally
+
+ENDLOCAL
Index: src/java/org/apache/cassandra/io/sstable/Descriptor.java
===================================================================
--- src/java/org/apache/cassandra/io/sstable/Descriptor.java	(revision 1026768)
+++ src/java/org/apache/cassandra/io/sstable/Descriptor.java	(working copy)
@@ -41,6 +41,8 @@
     public static final String CURRENT_VERSION = "e";
 
     public final File directory;
+    public final char separatorChar;
+
     public final String version;
     public final String ksname;
     public final String cfname;
@@ -63,12 +65,18 @@
 
     public Descriptor(String version, File directory, String ksname, String cfname, int generation, boolean temp)
     {
+				this(version, File.separatorChar, directory, ksname, cfname, generation, temp);
+    }
+
+    private Descriptor(String version, char separatorChar, File directory, String ksname, String cfname, int generation, boolean temp)
+    {
         assert version != null && directory != null && ksname != null && cfname != null;
         this.version = version;
         this.directory = directory;
         this.ksname = ksname;
         this.cfname = cfname;
         this.generation = generation;
+				this.separatorChar = separatorChar;
         temporary = temp;
         hashCode = Objects.hashCode(directory, generation, ksname, cfname);
 
@@ -90,7 +98,7 @@
     public String filenameFor(String suffix)
     {
         StringBuilder buff = new StringBuilder();
-        buff.append(directory).append(File.separatorChar);
+        buff.append(directory).append(separatorChar);
         buff.append(cfname).append("-");
         if (temporary)
             buff.append(SSTable.TEMPFILE_MARKER).append("-");
@@ -106,22 +114,34 @@
      */
     public static Descriptor fromFilename(String filename)
     {
-        int separatorPos = filename.lastIndexOf(File.separatorChar);
+        return fromFilename((new File(filename)).getAbsolutePath(), File.separatorChar);
+    }
+
+    public static Descriptor fromFilename(String filename, char separatorChar)
+    {
+        int separatorPos = filename.lastIndexOf(separatorChar);
         assert separatorPos != -1 : "Filename must include parent directory.";
-        File directory = new File(filename.substring(0, separatorPos));
+        String directory = filename.substring(0, separatorPos);
         String name = filename.substring(separatorPos+1, filename.length());
-        return fromFilename(directory, name).left;
+
+				// name of parent directory is keyspace name
+    	  separatorPos = directory.lastIndexOf(separatorChar);
+        String ksname = directory.substring(separatorPos+1, directory.length());
+
+        return fromFilename(new File(directory), ksname, name, separatorChar).left;
     }
 
     /**
      * Filename of the form "<ksname>/<cfname>-[tmp-][<version>-]<gen>-<component>"
      * @return A Descriptor for the SSTable, and the Component remainder.
      */
-    static Pair<Descriptor,String> fromFilename(File directory, String name)
+		static Pair<Descriptor,String> fromFilename(File directory, String name)
     {
-        // name of parent directory is keyspace name
-        String ksname = directory.getName();
+    	return fromFilename(directory, directory.getName(), name, File.separatorChar);
+    }
 
+    private static Pair<Descriptor,String> fromFilename(File directory, String ksname, String name, char separatorChar)
+    {
         // tokenize the filename
         StringTokenizer st = new StringTokenizer(name, "-");
         String nexttok = null;
@@ -150,7 +170,7 @@
         // component suffix
         String component = st.nextToken();
 
-        return new Pair<Descriptor,String>(new Descriptor(version, directory, ksname, cfname, generation, temporary), component);
+        return new Pair<Descriptor,String>(new Descriptor(version, separatorChar, directory, ksname, cfname, generation, temporary), component);
     }
 
     /**
@@ -158,7 +178,7 @@
      */
     public Descriptor asTemporary(boolean temporary)
     {
-        return new Descriptor(version, directory, ksname, cfname, generation, temporary);
+        return new Descriptor(version, separatorChar, directory, ksname, cfname, generation, temporary);
     }
 
     /**
Index: src/java/org/apache/cassandra/streaming/PendingFile.java
===================================================================
--- src/java/org/apache/cassandra/streaming/PendingFile.java	(revision 1026768)
+++ src/java/org/apache/cassandra/streaming/PendingFile.java	(working copy)
@@ -24,6 +24,7 @@
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -73,7 +74,7 @@
     {
         return desc.filenameFor(component);
     }
-    
+
     public boolean equals(Object o)
     {
         if ( !(o instanceof PendingFile) )
@@ -103,7 +104,9 @@
                 return;
             }
 
-            dos.writeUTF(sc.desc.filenameFor(sc.component));
+            //dos.writeUTF(sc.desc.filenameFor(sc.component));
+            dos.writeUTF(sc.getFilename());
+            dos.writeChar(sc.desc.separatorChar);
             dos.writeUTF(sc.component);
             dos.writeInt(sc.sections.size());
             for (Pair<Long,Long> section : sc.sections)
@@ -117,8 +120,10 @@
             String filename = dis.readUTF();
             if (filename.isEmpty())
                 return null;
-            
-            Descriptor desc = Descriptor.fromFilename(filename);
+
+            char separatorChar = dis.readChar();
+            Descriptor desc = Descriptor.fromFilename(filename, separatorChar);
+
             String component = dis.readUTF();
             int count = dis.readInt();
             List<Pair<Long,Long>> sections = new ArrayList<Pair<Long,Long>>(count);
