summaryrefslogtreecommitdiffstats
path: root/tdeprint/cups/make_driver_db_cups.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-20 15:10:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-20 15:10:50 -0600
commitb3e3f6026bca4ae56ff5d109d76961e0f47deab4 (patch)
tree92a96caf10ad11f7a3a846a8522b2598ae58e66f /tdeprint/cups/make_driver_db_cups.cpp
parent5a97ffdaae6532a39f1ebc1f0594833b1a253585 (diff)
downloadtdelibs-b3e3f6026bca4ae56ff5d109d76961e0f47deab4.tar.gz
tdelibs-b3e3f6026bca4ae56ff5d109d76961e0f47deab4.zip
Fix duplicated printer driver entries
This relates to Bug 2191
Diffstat (limited to 'tdeprint/cups/make_driver_db_cups.cpp')
-rw-r--r--tdeprint/cups/make_driver_db_cups.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tdeprint/cups/make_driver_db_cups.cpp b/tdeprint/cups/make_driver_db_cups.cpp
index c658181a7..a6dec1169 100644
--- a/tdeprint/cups/make_driver_db_cups.cpp
+++ b/tdeprint/cups/make_driver_db_cups.cpp
@@ -203,6 +203,13 @@ void initPpd(const char *dirname)
}
}
+void initCompressedPpd(const char *dirname)
+{
+ // HACK
+ // The initPpd function actually handles the compressed PPDs as well, so do nothing here
+ // If we were to rerun initPpd here then all drivers would be duplicated!
+}
+
int parsePpdFile(const char *filename, const char *origin, const char *metadata, FILE *output_file)
{
gzFile ppd_file;
@@ -350,7 +357,7 @@ int parseCompressedPpdFile(const char *ppdfilename, const char *origin, const ch
int main(int argc, char *argv[])
{
registerHandler("ppd:", initPpd, parsePpdFile);
- registerHandler("compressed-ppd:", initPpd, parseCompressedPpdFile);
+ registerHandler("compressed-ppd:", initCompressedPpd, parseCompressedPpdFile);
initFoomatic();
return execute(argc, argv);
}