]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix ppdmerge backup filename (Issue #5455)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 10 Dec 2018 14:19:57 +0000 (09:19 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 10 Dec 2018 14:19:57 +0000 (09:19 -0500)
CHANGES.md
ppdc/ppdmerge.cxx

index 65cbdb13018cb0ce0a060b99ba05ba1495f954b1..0f89216d4a3d2ff3a3a63df2a4de5e33bc94f782 100644 (file)
@@ -1,6 +1,12 @@
-CHANGES - 2.2.10 - 2018-12-07
+CHANGES - 2.2.10 - 2018-12-10
 =============================
 
+Changes in CUPS v2.2.11
+-----------------------
+
+- Running ppdmerge with the same input and output filenames did not work as
+  advertised (Issue #5455)
+
 
 Changes in CUPS v2.2.10
 -----------------------
index 3f6670f259862cb6058b8659a5f2e992e04c2db1..f8781827cf0ffa7d06d2131fb26499a558759afa 100644 (file)
@@ -1,8 +1,8 @@
 //
 // PPD file merge utility for the CUPS PPD Compiler.
 //
-// Copyright 2007-2014 by Apple Inc.
-// Copyright 2002-2007 by Easy Software Products.
+// Copyright © 2007-2018 by Apple Inc.
+// Copyright © 2002-2007 by Easy Software Products.
 //
 // These coded instructions, statements, and computer programs are the
 // property of Apple Inc. and are protected by Federal copyright
@@ -42,6 +42,7 @@ main(int  argc,                               // I - Number of command-line arguments
   cups_array_t *ppds;                  // Array of PPD files
   const char   *inname,                // First input filename
                *outname;               // Output filename (if any)
+  char         bckname[1024];          // Backup filename
   cups_file_t  *infile,                // Input file
                *outfile;               // Output file
   cups_array_t *languages;             // Languages in file
@@ -141,9 +142,6 @@ main(int  argc,                             // I - Number of command-line arguments
         if (outname && !strcmp(inname, outname))
        {
          // Rename input filename so that we don't overwrite it...
-         char bckname[1024];           // Backup filename
-
-
          snprintf(bckname, sizeof(bckname), "%s.bck", inname);
 
          if (rename(inname, bckname))