]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Report an error when the test file cannot be found.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 7 Apr 2021 13:44:22 +0000 (09:44 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 7 Apr 2021 13:44:22 +0000 (09:44 -0400)
CHANGES.md
tools/ipptool.c

index 9bebc1b7e64838fdbc1f91bc080880ae550aef3c..16576f7371d14bcacc651e61b6eaede57f6c03ff 100644 (file)
@@ -8,6 +8,9 @@ CUPS v2.4rc1 (Pending)
 - Added support for AirPrint and Mopria clients (Issue #105)
 - Added configure support for specifying systemd dependencies in the CUPS
   service file (Issue #144)
+- Added several features and improvements to `ipptool` (Issue #153)
+- The `ipptool` command now correctly reports an error when a test file cannot
+  be found.
 - Fixed Kerberos authentication for the web interface (Issue #19)
 - The ZPL sample driver now supports more "standard" label sizes (Issue #70)
 - The IPP backend did not return the correct status code when a job was canceled
@@ -21,7 +24,6 @@ CUPS v2.4rc1 (Pending)
 - The USB backend now runs as root (Issue #121)
 - Added pkg-config file for libcups (Issue #122)
 - Fixed a PPD memory leak caused by emulator definitions (Issue #124)
-- Added several features and improvements to `ipptool` (Issue #153)
 - The scheduler now includes the `[Job N]` prefix for job log messages, even
   when using syslog logging (Issue #154)
 - Added support for locales using the GB18030 character set (Issue #159)
index 25a34d2b60f8eada0a819644b60a3180c4629987..5cfdaab342b864b1bcf447ce79ec5e26cfed1f3d 100644 (file)
@@ -681,7 +681,12 @@ main(int  argc,                            /* I - Number of command-line args */
       else
         testfile = argv[i];
 
-      if (!do_tests(testfile, &data))
+      if (access(testfile, 0))
+      {
+        _cupsLangPrintf(stderr, _("%s: Unable to open \"%s\": %s"), "ipptool", testfile, strerror(errno));
+        status = 1;
+      }
+      else if (!do_tests(testfile, &data))
         status = 1;
     }
   }