Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > b2b31f8f12ce25fb0a2128354ea26724 > files > 56

cups-1.3.7-30.el5.src.rpm

diff -up cups-1.3.7/cups/util.c.str3055 cups-1.3.7/cups/util.c
--- cups-1.3.7/cups/util.c.str3055	2008-01-16 23:42:35.000000000 +0000
+++ cups-1.3.7/cups/util.c	2009-04-15 11:09:28.000000000 +0100
@@ -1253,6 +1253,21 @@ cupsPrintFiles2(http_t        *http,	/* 
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
                  title);
 
+  if (num_files == 1)
+  {
+   /*
+    * Add the original document filename...
+    */
+
+    if ((base = strrchr(files[0], '/')) != NULL)
+      base ++;
+    else
+      base = files[0];
+
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name",
+		 NULL, base);
+  }
+
  /*
   * Then add all options...
   */