]> 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:18:43 +0000 (09:18 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 10 Dec 2018 14:18:43 +0000 (09:18 -0500)
CHANGES.md
ppdc/ppdmerge.cxx

index e0e3c00db7a57ce5a1a30f3aefa39a78806e8748..3b98110201e77c9c846d023b1e495a6b22fdd581 100644 (file)
@@ -1,10 +1,12 @@
-CHANGES - 2.3b6 - 2018-12-08
+CHANGES - 2.3b6 - 2018-12-10
 ============================
 
 Changes in CUPS v2.3b7
 ----------------------
 
 - Fixed some build failures (Issue #5451)
+- Running ppdmerge with the same input and output filenames did not work as
+  advertised (Issue #5455)
 
 
 Changes in CUPS v2.3b6
index 8570948d5f3b976d31b7596b2462b65a9da73370..94d67ff839a34e38b102f175f34e0dc533193505 100644 (file)
@@ -1,10 +1,11 @@
 //
 // 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.
 //
-// Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+// Licensed under Apache License v2.0.  See the file "LICENSE" for more
+// information.
 //
 
 //
@@ -38,6 +39,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
@@ -137,9 +139,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))