summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 11a9e7f7b..2b91a46f7 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -604,12 +604,16 @@ bool FileFd::Open(string FileName,OpenMode Mode, unsigned long Perms)
{
case ReadOnly:
iFd = open(FileName.c_str(),O_RDONLY);
+ break;
+
+ case ReadOnlyGzip:
+ iFd = open(FileName.c_str(),O_RDONLY);
if (iFd > 0 && FileName.compare(FileName.size()-3, 3, ".gz") == 0) {
- gz = gzdopen (iFd, "r");
- if (gz == NULL) {
- close (iFd);
- iFd = -1;
- }
+ gz = gzdopen (iFd, "r");
+ if (gz == NULL) {
+ close (iFd);
+ iFd = -1;
+ }
}
break;