diff options
author | bubulle@debian.org <> | 2006-10-06 20:05:32 +0200 |
---|---|---|
committer | bubulle@debian.org <> | 2006-10-06 20:05:32 +0200 |
commit | 0f1916f7f1e88f07440c4bca3cc9df5cae7a55f7 (patch) | |
tree | 78cd136212d0a9a590818a4f6d13276b68ab0596 /methods | |
parent | c5f2dd5b33d2ce0d5d0547535f435a179c249995 (diff) | |
parent | 75c541fdeda664bdf0e48e68a2aa5dae7015587c (diff) |
Danish translation update
Diffstat (limited to 'methods')
-rw-r--r-- | methods/gzip.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc index 55ff33270..f732c0b86 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -52,6 +52,13 @@ bool GzipMethod::Fetch(FetchItem *Itm) // Open the source and destination files FileFd From(Path,FileFd::ReadOnly); + // if the file is empty, just rename it and return + if(From.Size() == 0) + { + rename(Path.c_str(), Itm->DestFile.c_str()); + return true; + } + int GzOut[2]; if (pipe(GzOut) < 0) return _error->Errno("pipe",_("Couldn't open pipe for %s"),Prog); |