Author: areshetnyak
Date: 2010-04-02 10:06:57 -0400 (Fri, 02 Apr 2010)
New Revision: 2215
Modified:
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdSize.java
Log:
EXOJCR-633 : The problem with ftp commands CmdSize on "/" was fixed.
Modified:
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdSize.java
===================================================================
---
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdSize.java 2010-04-02
09:41:21 UTC (rev 2214)
+++
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdSize.java 2010-04-02
14:06:57 UTC (rev 2215)
@@ -55,8 +55,15 @@
}
String resName = params[1];
-
+
ArrayList<String> newPath = clientSession().getFullPath(resName);
+
+ if (newPath.size() == 0)
+ {
+ reply(String.format(FtpConst.Replyes.REPLY_550_SIZE, resName));
+ return;
+ }
+
String repoPath = clientSession().getRepoPath(newPath);
try
{