]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't append / to attribute specification string if no / is in the
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Feb 2003 10:28:25 +0000 (10:28 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Feb 2003 10:28:25 +0000 (10:28 +0000)
original attribute line in the file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3409 7a7537e8-13f0-0310-91df-b6672ffda945

cups/ppd.c

index 3f33b078b75289978ef542d860cd05df5cc3a126..60bef9f82e2d26ef025980c56b7bc3b4b4741d04 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ppd.c,v 1.99 2003/02/25 19:06:39 mike Exp $"
+ * "$Id: ppd.c,v 1.100 2003/02/28 10:28:25 mike Exp $"
  *
  *   PPD file routines for the Common UNIX Printing System (CUPS).
  *
@@ -1882,8 +1882,13 @@ ppdOpen(FILE *fp)                        /* I - File to read from */
     {
       char     spec[PPD_MAX_NAME + PPD_MAX_TEXT];
 
-      snprintf(spec, sizeof(spec), "%s/%s", name, text);
-      ppd_add_attr(ppd, keyword, spec, string);
+      if (text[0])
+      {
+        snprintf(spec, sizeof(spec), "%s/%s", name, text);
+        ppd_add_attr(ppd, keyword, spec, string);
+      }
+      else
+        ppd_add_attr(ppd, keyword, name, string);
 
       string = NULL;                   /* Don't free this string below */
     }
@@ -2974,5 +2979,5 @@ ppd_read(FILE *fp,                        /* I - File to read from */
 
 
 /*
- * End of "$Id: ppd.c,v 1.99 2003/02/25 19:06:39 mike Exp $".
+ * End of "$Id: ppd.c,v 1.100 2003/02/28 10:28:25 mike Exp $".
  */