commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Beer (JIRA)" <j...@apache.org>
Subject [jira] Closed: (NET-322) can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server
Date Fri, 07 May 2010 08:24:48 GMT

     [ https://issues.apache.org/jira/browse/NET-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Beer closed NET-322.
---------------------------

    Resolution: Duplicate

> can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server
> -------------------------------------------------------------------------------------
>
>                 Key: NET-322
>                 URL: https://issues.apache.org/jira/browse/NET-322
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP/ Unix
>            Reporter: Thomas Beer
>            Priority: Minor
>
> I have to analyze something and a name of a folder was stored like an ID. This ID is
user-dependent. I won't manipulate this ID. But I can not upload some folder or file begins
with "-".
> Example: 
> ##########################################################################################
> 2010-05-07 09:11:45,982 [main] INFO  proxy.ftp.FTPClientUtil - Set working dir=true to:
"path"
> 2010-05-07 09:11:45,982 [main] INFO  proxy.ftp.FTPClientUtil - Copy directory: Test to
the current working directory.
> Can't store something begins with "-":
> 2010-05-07 09:11:45,982 [main] DEBUG proxy.ftp.FTPClientUtil - create new dir: -=false
> 2010-05-07 09:11:45,998 [main] DEBUG proxy.ftp.FTPClientUtil - store file: --------------_07.47.58=false
> But can store something begins not with "-":
> 2010-05-07 09:11:46,060 [main] DEBUG proxy.ftp.FTPClientUtil - create new dir: 1-=true
> 2010-05-07 09:11:46,279 [main] DEBUG proxy.ftp.FTPClientUtil - store file: 2010-04-26_--------------_07.47.58=true
> 2010-05-07 09:11:46,279 [main] INFO  proxy.ftp.FTPClientUtil - Copy done!
> 2010-05-07 09:11:46,279 [main] INFO  proxy.ftp.FTPClientUtil - Disconnected from server.
> ##########################################################################################
> I used this functions from FTPClient (see below):
> ##########################################################################################
> logger.debug("create new dir: " + dir.getName() + "=" + ftp.makeDirectory(dir.getName()));
> logger.debug("store file: " + file.getName() + "=" + ftp.storeFile(file.getName(), fis));
> ##########################################################################################
> functions from FTPClient:
> /**store directory**/   
> public boolean makeDirectory(String pathname) throws IOException
> {
>     return FTPReply.isPositiveCompletion(mkd(pathname));
> }
> /**store file**/
> public boolean storeFile(String remote, InputStream local)
>  throws IOException
> {
>      return __storeFile(FTPCommand.STOR, remote, local);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message