summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-04-14 16:16:06 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-04-14 16:55:35 +0200
commit479f6fa454cd6ee9e1bc4d9ecda856d34584092e (patch)
treea30949d2fae2f523123a7f44ee64c689555bafbe /methods
parente169fa4a85e03b2b03bb1bdba716b96654ae6050 (diff)
allow uncompressed files to be empty in store again
With the previous fix for file applied we can again hit repositories which contain uncompressed empty files, which since the introduction of the central store: method wasn't accounted for anymore as we forbid empty compressed files.
Diffstat (limited to 'methods')
-rw-r--r--methods/store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/methods/store.cc b/methods/store.cc
index 29cf9e947..2ad0f0177 100644
--- a/methods/store.cc
+++ b/methods/store.cc
@@ -73,7 +73,7 @@ bool StoreMethod::Fetch(FetchItem *Itm) /*{{{*/
{
if (OpenFileWithCompressorByName(From, Path, FileFd::ReadOnly, Prog) == false)
return false;
- if(From.FileSize() == 0)
+ if(From.IsCompressed() && From.FileSize() == 0)
return _error->Error(_("Empty files can't be valid archives"));
}
else