diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-01-09 01:03:31 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-01-10 13:31:14 +0100 |
commit | 31be38d205406d4c756684e20b93d62c4701e091 (patch) | |
tree | 2a909c180563e5e662a7578ed162b0d6401d9a96 /ftparchive/cachedb.cc | |
parent | d13f2ef5dd2cf41d7abd7f309a9e8965a77d2a63 (diff) |
128 KiB DSC files ought to be enough for everyone
Your mileage may vary, but don't worry: There is more than one way to
do it, but our one size fits all is not a bigger hammer, but an entire
roundhouse kick! So brace yourself for the tl;dr: The limit is gone.*
Beware: This fixes also the problem that a double newline is
unconditionally added 'later' which is an overcommitment in case
the dsc filesize is limit-2 <= x <= limit.
* limited to numbers fitting into an unsigned long long.
Closes: 774893
Diffstat (limited to 'ftparchive/cachedb.cc')
-rw-r--r-- | ftparchive/cachedb.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 0901492f7..c73a64fb7 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -328,12 +328,12 @@ bool CacheDB::LoadSource() if (Dsc.Read(FileName) == false) return false; - if (Dsc.Data == 0) + if (Dsc.Length == 0) return _error->Error(_("Failed to read .dsc")); - + // Write back the control information InitQuerySource(); - if (Put(Dsc.Data, Dsc.Length) == true) + if (Put(Dsc.Data.c_str(), Dsc.Length) == true) CurStat.Flags |= FlSource; return true; |