You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Beer (JIRA)" <ji...@apache.org> on 2010/05/07 10:10:48 UTC

[jira] Created: (NET-322) can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server

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
         Environment: Windows XP/ Unix
            Reporter: Thomas Beer


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.


[jira] Updated: (NET-322) can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server

Posted by "Thomas Beer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Beer updated NET-322:
----------------------------

    Priority: Minor  (was: Major)

> 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.


[jira] Closed: (NET-322) can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server

Posted by "Thomas Beer (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (NET-322) can not upload/store a file/folder begins with "-" (hyphen character) to a FTP-Server

Posted by "Thomas Beer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Beer updated NET-322:
----------------------------

    Affects Version/s: 2.0

> 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
>
> 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.