Author: jleroux Date: Sat Nov 29 12:52:43 2014 New Revision: 1642426 URL: http://svn.apache.org/r1642426 Log: "Applied fix from trunk for revision: 1642423" ------------------------------------------------------------------------ r1642423 | jleroux | 2014-11-29 13:47:19 +0100 (sam. 29 nov. 2014) | 3 lignes
A fix from bill hongs for "ImageManagementServices.createContentAndDataResource() method might uses DataResource.dataResourceName field to store too long names" https://issues.apache.org/jira/browse/OFBIZ-5501 This issue was only on windows, except if you use filenames longer than 100 chars which unlikely (path not included) ------------------------------------------------------------------------ Modified: ofbiz/branches/release12.04/ (props changed) ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Propchange: ofbiz/branches/release12.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1642423 Modified: ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1642426&r1=1642425&r2=1642426&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original) +++ ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Sat Nov 29 12:52:43 2014 @@ -175,7 +175,7 @@ public class ImageManagementServices { file = checkExistsImage(file); if (UtilValidate.isNotEmpty(file)) { imageName = file.getPath(); - imageName = imageName.substring(imageName.lastIndexOf("/") + 1); + imageName = imageName.substring(imageName.lastIndexOf(File.separator) + 1); } if (UtilValidate.isEmpty(imageResize)) {

