From: mike Date: Wed, 12 Dec 2012 20:19:43 +0000 (+0000) Subject: The scheduler did not delete job control backup files (STR #4244) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fa89e4b660467546057440643e2f8dfcdaf8f42;p=thirdparty%2Fcups.git The scheduler did not delete job control backup files (STR #4244) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10753 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.6.txt b/CHANGES-1.6.txt index 0b4018760b..17ba0d3c76 100644 --- a/CHANGES-1.6.txt +++ b/CHANGES-1.6.txt @@ -7,6 +7,7 @@ CHANGES IN CUPS V1.6.2 - Security: All file, directory, user, and group settings are now stored in a separate cups-files.conf configuration file that cannot be set through the CUPS web interface or APIs (STR #4223) + - The scheduler did not delete job control backup files (STR #4244) - cupsGetPPD3 could return a local PPD instead of the correct remote PPD. - The scheduler incorrectly advertised auth-info-required for local diff --git a/scheduler/job.c b/scheduler/job.c index 41d7685f09..b52892a1f9 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -2193,7 +2193,16 @@ cupsdSaveJob(cupsd_job_t *job) /* I - Job */ } if (!cupsdCloseCreatedConfFile(fp, filename)) + { + /* + * Remove backup file and mark this job as clean... + */ + + strlcat(filename, ".O", sizeof(filename)); + unlink(filename); + job->dirty = 0; + } }