Opened 10 years ago

Closed 10 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:
Has a Patch: no 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 Changed 10 years ago by korli

How would a patch file be recognized ?

comment:2 Changed 10 years ago by idefix

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 Changed 10 years ago by idefix

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 Changed 10 years ago by axeld

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

Thanks! Fix applied in hrev34100.

Note: See TracTickets for help on using tickets.