]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler/job.c: use gziptoany for raw files (not just raw printers) 209/head
authorBryan Mason <bmason@redhat.com>
Thu, 15 Jul 2021 23:26:27 +0000 (16:26 -0700)
committerBryan Mason <bmason@redhat.com>
Thu, 15 Jul 2021 23:26:27 +0000 (16:26 -0700)
scheduler/job.c

index d8c2efcc6bb5b23b44381e07c31eb718ad1099d8..b448acda5fec7dc35673b727f9991cd5c08d21d0 100644 (file)
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
   int                  backroot;       /* Run backend as root? */
   int                  pid;            /* Process ID of new filter process */
   int                  banner_page;    /* 1 if banner page, 0 otherwise */
+  int                  raw_file;       /* 1 if file type is vnd.cups-raw */
   int                  filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
                                        /* Pipes used between filters */
   int                  envc;           /* Number of environment variables */
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
   * Add decompression/raw filter as needed...
   */
 
+  raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
+    !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
+  
   if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
-      (!job->printer->remote && job->printer->raw && job->num_files > 1))
+      (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
   {
    /*
     * Add gziptoany filter to the front of the list...