svnno****@sourc*****
svnno****@sourc*****
2008年 3月 17日 (月) 13:30:43 JST
Revision: 861 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=861 Author: shinsuke Date: 2008-03-17 13:30:42 +0900 (Mon, 17 Mar 2008) Log Message: ----------- checked a file separator for windows. Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/PortletDeploymentService.java -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/PortletDeploymentService.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/PortletDeploymentService.java 2008-03-13 01:04:51 UTC (rev 860) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/PortletDeploymentService.java 2008-03-17 04:30:42 UTC (rev 861) @@ -144,7 +144,7 @@ "Could not get the input stream for the uploaded file.", e); } - String name = removeExtension(uploadedFile.getName()); + String name = getPortletApplicationName(uploadedFile.getName()); PortletApplication pa = new PortletApplication(); pa.setName(name); pa.setArtifactId(name); @@ -156,11 +156,15 @@ } - private String removeExtension(String name) { + private String getPortletApplicationName(String name) { int pos = name.lastIndexOf("."); if (pos != -1) { - return name.substring(0, pos); + name = name.substring(0, pos); } + pos = name.lastIndexOf("\\"); + if (pos != -1) { + name = name.substring(pos + 1); + } return name; }