From 8bf30c28ab4379dfc403f00b587ff0b58b89585b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 20 Nov 2014 15:10:50 -0600 Subject: [PATCH] Fix duplicated printer driver entries This relates to Bug 2191 (cherry picked from commit b3e3f6026bca4ae56ff5d109d76961e0f47deab4) --- kdeprint/cups/make_driver_db_cups.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kdeprint/cups/make_driver_db_cups.cpp b/kdeprint/cups/make_driver_db_cups.cpp index 1651ca6f3..d1c556242 100644 --- a/kdeprint/cups/make_driver_db_cups.cpp +++ b/kdeprint/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); }