Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 88211 invoked from network); 26 May 2004 08:20:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 26 May 2004 08:20:44 -0000 Received: (qmail 19278 invoked by uid 500); 26 May 2004 08:21:20 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 18965 invoked by uid 500); 26 May 2004 08:21:16 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 18922 invoked by uid 500); 26 May 2004 08:21:16 -0000 Received: (qmail 18794 invoked by uid 98); 26 May 2004 08:21:14 -0000 Received: from imario@apache.org by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(209.237.227.194):. Processed in 0.522142 secs); 26 May 2004 08:21:14 -0000 X-Qmail-Scanner-Mail-From: imario@apache.org via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(209.237.227.194):. Processed in 0.522142 secs) Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by hermes.apache.org with SMTP; 26 May 2004 08:21:13 -0000 Received: (qmail 88003 invoked by uid 1850); 26 May 2004 08:20:27 -0000 Date: 26 May 2004 08:20:27 -0000 Message-ID: <20040526082027.88002.qmail@minotaur.apache.org> From: imario@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileProvider.java X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N imario 2004/05/26 01:20:27 Modified: vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileProvider.java Log: create ftpclient as soon as possible to see if host/credentials are correct Revision Changes Path 1.8 +13 -5 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java Index: FtpFileProvider.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FtpFileProvider.java 19 May 2004 19:34:06 -0000 1.7 +++ FtpFileProvider.java 26 May 2004 08:20:27 -0000 1.8 @@ -1,12 +1,12 @@ /* * Copyright 2002, 2003,2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,7 @@ */ package org.apache.commons.vfs.provider.ftp; +import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.vfs.Capability; import org.apache.commons.vfs.FileName; import org.apache.commons.vfs.FileSystem; @@ -77,7 +78,14 @@ { // Create the file system final GenericFileName rootName = (GenericFileName) name; - return new FtpFileSystem(rootName, fileSystemOptions); + + FTPClient ftpClient = FtpClientFactory.createConnection(rootName.getHostName(), + rootName.getPort(), + rootName.getUserName(), + rootName.getPassword(), + rootName.getPath()); + + return new FtpFileSystem(rootName, ftpClient, fileSystemOptions); } public FileSystemConfigBuilder getConfigBuilder() --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org