MIME auto-typing fails to match filename patterns #2659

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

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Jan 8, 2008

Version: 1.3.5
CUPS.org User: twaugh.redhat

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

Collaborator

michaelrsweet commented Jan 9, 2008

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Jan 9, 2008

"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 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