[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-bugs
Subject:    [Bug 975]  New: Calling Upload_file without a file size
From:       "DO NOT REPLY - use bugs.bricolage.cc" <bugs () bricolage ! cc>
Date:       2005-05-16 14:50:28
Message-ID: 20050516145028.D6D0C8B06 () mail ! exclupen ! com
[Download RAW message or body]

http://bugs.bricolage.cc/show_bug.cgi?id=975

           Summary: Calling Upload_file without a file size
           Product: Bricolage
           Version: 1.8.5 - Current Stable Release
          Platform: Other
        OS/Version: Unix
            Status: NEW
          Severity: normal
          Priority: P2
         Component: API
        AssignedTo: bugs@lists.bricolage.cc
        ReportedBy: pg@rbt.ca


User-Agent:       Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.8) Gecko/20050514 Epiphany/1.6.3
Build Identifier: 

The file size is not collected for the file, as a result of the wrong flag being
used in the set_size() call. -S tests for a socket, -s tests and returns the
file size. Discovered because PostgreSQL rejected the numeric value of "".

*** /tmp/Media.pm       Mon May 16 10:41:55 2005
--- Media.pm    Mon May 16 10:42:53 2005
***************
*** 1460,1466 ****
          $self->_set(['media_type_id', '_media_type_obj'], [0, undef]);
      }

!     $self->set_size(defined $size ? $size : -S $path);

      # Get the Output Channel object.
      my $at_obj = $self->_get_element_object;
--- 1460,1466 ----
          $self->_set(['media_type_id', '_media_type_obj'], [0, undef]);
      }

!     $self->set_size(defined $size ? $size : -s $path);

      # Get the Output Channel object.
      my $at_obj = $self->_get_element_object;


Reproducible: Always
Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: http://bugs.bricolage.cc/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic