Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#559 URC: files with special characters in the name disappear

UNICORE7.0
open
UNICORE/X (63)
6.4, 6.5, 6.6
4
2013-12-13
2012-07-12
Sandra Bergmann
No

URC 6.4.3
I have a simple application, which I have added to the IDB including pre/post command.
The pre command unzip a zip file in the job directory.
The name of the unzipped directory is "CSR+Tesseract". It appears for a short time in the job directory. After refreshing the job directory it disappears.
If i change the name of the unzipped directory I have no problems. So the special character "+" might be the problem for this disappearing.
The client log is empty. On server side every thing is fine.

Discussion

  • The problem may be caused by this code in SMSBaseImpl.java. There's some kind of mapping going on assuming that files are always created by the client and will never contain special characters when created on the remote side. This should be fixed or well explained.

    Naturally, the two methods are not symmetric, and cannot be.

    I'm putting this in the UNICORE/X category, as it concerns all components.

    /**
    * URL-decode a string (e.g. replacing "%20" and "+" by spaces)
    *
    * @param p - the string to decode
    * @return
    */
    public static String urlDecode(String p){
    try{
    return URLDecoder.decode(p.replaceAll("\\+","%20"), "UTF-8");
    }catch(Exception ex){
    logger.warn(ex);
    return p;
    }
    }

    /**
    * fix illegal characters (like spaces) in the parameter,
    * so a URL can be built from it
    * @param p
    * @return
    */
    public static String urlEncode(String orig){
    try{
    return URIUtils.encodeAll(orig);
    }catch(Exception e){
    logger.error(e);
    return orig;
    }
    }

     
    • labels: 613423 --> UNICORE/X
     
  • Bastian Demuth
    Bastian Demuth
    2012-12-11

    • assigned_to: bdemuth --> bschuller
     
  • Bastian Demuth
    Bastian Demuth
    2012-12-11

    This is a server-side bug. In such scenarios, the storage client lists the file, but when you try to receive its properties, it throws an exception..

     
    • Affected Versions: --> 6.4, 6.5, 6.6
     
  • Bernd Schuller
    Bernd Schuller
    2013-12-13

    • Fixed in: -->
    • Milestone: UNICORE6.4 --> UNICORE7.0