You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/11/29 13:52:42 UTC

svn commit: r1642425 - in /ofbiz/branches/release13.07: ./ applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java

Author: jleroux
Date: Sat Nov 29 12:52:41 2014
New Revision: 1642425

URL: http://svn.apache.org/r1642425
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/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1642423

Modified: ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1642425&r1=1642424&r2=1642425&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Sat Nov 29 12:52:41 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)) {