legal/Apache_license-1.1.txt
author Asier Lostalé <asier.lostale@openbravo.com>
Wed, 18 Mar 2015 10:50:25 +0100
changeset 26205 e7c1d9e51ba8
parent 809 4366038ff51c
permissions -rw-r--r--
fixed bug 29329: can't download attachments for 2 rows with same name & no ext

When trying to download at once attachemnts for different records that have the
same name and it does not have extension, it fails.

The problem is in case of duplicated names to be included within the zipped file,
a number is appended to the file name before the extension. Extesion is present
is assumed, failing if not.

Fix: don't assume file name has extension.
juanpablo@809
     1
/* ====================================================================
juanpablo@809
     2
 * The Apache Software License, Version 1.1
juanpablo@809
     3
 *
juanpablo@809
     4
 * Copyright (c) 2000 The Apache Software Foundation.  All rights
juanpablo@809
     5
 * reserved.
juanpablo@809
     6
 *
juanpablo@809
     7
 * Redistribution and use in source and binary forms, with or without
juanpablo@809
     8
 * modification, are permitted provided that the following conditions
juanpablo@809
     9
 * are met:
juanpablo@809
    10
 *
juanpablo@809
    11
 * 1. Redistributions of source code must retain the above copyright
juanpablo@809
    12
 *    notice, this list of conditions and the following disclaimer.
juanpablo@809
    13
 *
juanpablo@809
    14
 * 2. Redistributions in binary form must reproduce the above copyright
juanpablo@809
    15
 *    notice, this list of conditions and the following disclaimer in
juanpablo@809
    16
 *    the documentation and/or other materials provided with the
juanpablo@809
    17
 *    distribution.
juanpablo@809
    18
 *
juanpablo@809
    19
 * 3. The end-user documentation included with the redistribution,
juanpablo@809
    20
 *    if any, must include the following acknowledgment:
juanpablo@809
    21
 *       "This product includes software developed by the
juanpablo@809
    22
 *        Apache Software Foundation (http://www.apache.org/)."
juanpablo@809
    23
 *    Alternately, this acknowledgment may appear in the software itself,
juanpablo@809
    24
 *    if and wherever such third-party acknowledgments normally appear.
juanpablo@809
    25
 *
juanpablo@809
    26
 * 4. The names "Apache" and "Apache Software Foundation" must
juanpablo@809
    27
 *    not be used to endorse or promote products derived from this
juanpablo@809
    28
 *    software without prior written permission. For written
juanpablo@809
    29
 *    permission, please contact apache@apache.org.
juanpablo@809
    30
 *
juanpablo@809
    31
 * 5. Products derived from this software may not be called "Apache",
juanpablo@809
    32
 *    nor may "Apache" appear in their name, without prior written
juanpablo@809
    33
 *    permission of the Apache Software Foundation.
juanpablo@809
    34
 *
juanpablo@809
    35
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
juanpablo@809
    36
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
juanpablo@809
    37
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
juanpablo@809
    38
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
juanpablo@809
    39
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
juanpablo@809
    40
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
juanpablo@809
    41
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
juanpablo@809
    42
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
juanpablo@809
    43
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
juanpablo@809
    44
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
juanpablo@809
    45
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
juanpablo@809
    46
 * SUCH DAMAGE.
juanpablo@809
    47
 * ====================================================================
juanpablo@809
    48
 *
juanpablo@809
    49
 * This software consists of voluntary contributions made by many
juanpablo@809
    50
 * individuals on behalf of the Apache Software Foundation.  For more
juanpablo@809
    51
 * information on the Apache Software Foundation, please see
juanpablo@809
    52
 * <http://www.apache.org/>.
juanpablo@809
    53
 *
juanpablo@809
    54
 * Portions of this software are based upon public domain software
juanpablo@809
    55
 * originally written at the National Center for Supercomputing Applications,
juanpablo@809
    56
 * University of Illinois, Urbana-Champaign.
juanpablo@809
    57
 */