Opened 15 years ago

Closed 14 years ago

#4749 closed bug (fixed)

Patch file-type not recognized

Reported by: idefix Owned by: bonefish
Priority: normal Milestone: R1
Component: - General Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When I create a patch file using svn diff it gets recognized as either text/plain when it's a html-diff (like attachment:ticket:4748:bootloader.patch) or text/x-source-code when it's a sourcecode-file (like attachment:ticket:4732:installer.patch).

It should get recognized as text/x-patch.

Change History (4)

comment:1 by korli, 15 years ago

How would a patch file be recognized ?

comment:2 by idefix, 15 years ago

According to FileTypes, text/x-patch can have one of the following extensions:

  • .diff
  • .patch

And it's recognition rule is:

0.30          ([0:100]"diff " | [0:100]"--- " | [0:100]"+++ " | [0:100]"@@ -")

comment:3 by idefix, 14 years ago

Changing the recognition rule of text/x-patch to:

0.30          ([0:100]"Index: " | [0:100]"--- " | [0:100]"+++ " | [0:100]"@@ -")

Gets it correctly recognized as a patch file.

comment:4 by axeld, 14 years ago

Component: Servers/registrar- General
Resolution: fixed
Status: newclosed

Thanks! Fix applied in hrev34100.

Note: See TracTickets for help on using tickets.