Mailinglist Archive: zypp-commit (149 mails)

< Previous Next >
[zypp-commit] r5457 - in /trunk/libzypp/zypp/base: InputStream.cc InputStream.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Fri, 27 Apr 2007 13:00:56 -0000
  • Message-id: <20070427130057.21273592EE@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Fri Apr 27 15:00:56 2007
New Revision: 5457

URL: http://svn.opensuse.org/viewcvs/zypp?rev=5457&view=rev
Log:
Made InputStream set no size for compressed files.

Modified:
    trunk/libzypp/zypp/base/InputStream.cc
    trunk/libzypp/zypp/base/InputStream.h

Modified: trunk/libzypp/zypp/base/InputStream.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/InputStream.cc?rev=5457&r1=5456&r2=5457&view=diff
==============================================================================
--- trunk/libzypp/zypp/base/InputStream.cc (original)
+++ trunk/libzypp/zypp/base/InputStream.cc Fri Apr 27 15:00:56 2007
@@ -30,7 +30,7 @@
     inline std::streamoff _heplerInitSize( const Pathname & file_r )
     {
       PathInfo p( file_r );
-      if ( p.isFile() )
+      if ( p.isFile() && filesystem::zipType( file_r ) == filesystem::ZT_NONE )
        return p.size();
       return -1;
     }

Modified: trunk/libzypp/zypp/base/InputStream.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/InputStream.h?rev=5457&r1=5456&r2=5457&view=diff
==============================================================================
--- trunk/libzypp/zypp/base/InputStream.h (original)
+++ trunk/libzypp/zypp/base/InputStream.h Fri Apr 27 15:00:56 2007
@@ -111,14 +111,14 @@
     const Pathname & path() const
     { return _path; }
 
-    /** Size of the input stream (might be estimated).
-     * If constructed from a file, the file size. Otherwise \c -1.
-     * See \ref setSize;
+    /** Size of the input stream (informal).
+     * If constructed from an uncompressed file, the file size.
+     * Otherwise \c -1. See \ref setSize;
     */
     std::streamoff size() const
     { return _size; }
 
-    /** Set the (estimated) size of the input stream.
+    /** Set the size of the input stream.
      * You may set it to whatever vaule is appropriate. E.g.
      * <tt>*=10</tt> to compensate gzip comression. or the
      * number of items, lines, ... The value is not used here,

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages