MIME auto-typing fails to match filename patterns #2659

Closed
michaelrsweet opened this Issue Jan 8, 2008 · 2 comments

1 participant

@michaelrsweet

Version: 1.3.5
CUPS.org User: twaugh.redhat

Filename-based MIME rules fail due to a mistake in type.c. Patch attached.

@michaelrsweet

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet

"cups-mime-filename.patch":

diff -up cups-1.3.5/scheduler/type.c~ cups-1.3.5/scheduler/type.c
--- cups-1.3.5/scheduler/type.c~ 2007-07-11 22:46:42.000000000 +0100
+++ cups-1.3.5/scheduler/type.c 2008-01-08 18:06:21.000000000 +0000
@@ -567,12 +567,12 @@ mimeFileType(mime_t mime, / I - M
if ((base = strrchr(filename, '/')) != NULL)
base ++;
else

  • filename = filename;
  • base = filename; } else if ((base = strrchr(pathname, '/')) != NULL) base ++; else
  • filename = pathname;
  • base = pathname;

    /*

    • Then check it against all known types...
@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment