Ticket #4128 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

improve handling of compressed content in mc.ext

Reported by: ossi Owned by: andrew_b
Priority: major Milestone: 4.8.26
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking: #2117
Branch state: merged Votes for changeset: committed-master


this may be controversial - there is a related thread at https://mail.gnome.org/archives/mc/2005-June/thread.html#00022, though one would expect it to be outdated by now. i've been using this code for a very long time.

Change History

comment:1 Changed 4 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.26

comment:2 Changed 4 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from no branch to approved

Branch: 4128_mc.ext_compressed_content

comment:3 Changed 4 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged


Merged to master: [eeb14d3f482c7a37e4a2391b951a84b451b3d6a7].

comment:4 Changed 4 years ago by andrew_b

  • Status changed from testing to closed

comment:5 Changed 4 years ago by zaytsev

It would be awesome if someone did something to ts - right now it is always regarded as a video file. This might have been reasonable before the advent of TypeScript, but now most of TS-files are actually code.

Unfortunately file is not perfect:

zaytsev@parallels:~/src/app/src$ file main.ts 
main.ts: Java source, ASCII text

zaytsev@parallels:~/src/app/src$ file typings.d.ts 
typings.d.ts: ASCII text

zaytsev@parallels:~/src/app/src$ file test.ts 
test.ts: Java source, UTF-8 Unicode text

Maybe match on text before video?

comment:6 Changed 4 years ago by ossi

that's one hell of an overloaded extension:

> file qt/translations/qt_ru.ts
qt/translations/qt_ru.ts: XML 1.0 document, UTF-8 Unicode text, with very long lines

(this extension predates typescript by over a decade.)

we can keep the order, but need to switch to content detection:

# does anyone have a sample file to verify that?
    Open=linguist %f

comment:7 Changed 4 years ago by zaytsev

zaytsev@parallels:~/src$ file sample_640x360.ts 
sample_640x360.ts: data

zaytsev@parallels:~/src$ file ed24p_10.ts 
ed24p_10.ts: data

comment:8 Changed 4 years ago by ossi

heh, FAIL.
then we need some coding, to enable compound conditions like this:


(so basically AND conditions by stacking.)

i'd suggest to create a new ticket (and possibly delete the kinda off-topic comments here).

comment:9 Changed 4 years ago by zaytsev

Done in #4141.

comment:10 Changed 4 years ago by zaytsev

  • Blocking 2117 added
Note: See TracTickets for help on using tickets.