camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r761009 - /camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
Date Wed, 01 Apr 2009 18:52:10 GMT
Author: janstey
Date: Wed Apr  1 18:52:10 2009
New Revision: 761009

URL: http://svn.apache.org/viewvc?rev=761009&view=rev
Log:
Fix unit test error on Windows

Modified:
    camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java

Modified: camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java?rev=761009&r1=761008&r2=761009&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
(original)
+++ camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
Wed Apr  1 18:52:10 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.component.file.remote;
 
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.util.concurrent.ScheduledExecutorService;
 
@@ -101,7 +102,7 @@
             if (endpoint.getConfiguration().isDirectory()) {
                 pollDirectory(fileName);
             } else {
-                int index = fileName.lastIndexOf('/');
+                int index = fileName.lastIndexOf(File.separatorChar);
                 if (index > -1) {
                     // cd to the folder of the filename
                     client.changeWorkingDirectory(fileName.substring(0, index));



Mime
View raw message