* Don't allow 'system' filters to be deleted

* Code cleanup
* Static UUID for "default/system" filters
This commit is contained in:
Bryan Ashby 2017-07-09 20:00:36 -06:00
parent fb9ecbfb93
commit d230a2f58b
11 changed files with 91 additions and 24 deletions

View file

@ -368,7 +368,7 @@ function getDefaultConfig() {
desc : 'Gzip Archive',
sig : '1f8b',
offset : 0,
archiveHandler : '7Zip',
archiveHandler : 'TarGz',
},
// :TODO: application/x-bzip
'application/x-bzip2' : {
@ -479,6 +479,22 @@ function getDefaultConfig() {
cmd : 'unrar',
args : [ 'e', '{archivePath}', '{extractPath}', '{fileList}' ],
}
},
TarGz : {
decompress : {
cmd : 'tar',
args : [ '-xf', '{archivePath}', '-C', '{extractPath}', '--strip-components=1' ],
},
list : {
cmd : 'tar',
args : [ '-tvf', '{archivePath}' ],
entryMatch : '^[drwx\\-]{10}\\s[A-Za-z0-9\\/]+\\s+([0-9]+)\\s[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}\\s[0-9]{2}\\:[0-9]{2}\\s([^\\r\\n]+)$',
},
extract : {
cmd : 'tar',
args : [ '-xvf', '{archivePath}', '-C', '{extractPath}', '{fileList}' ],
}
}
},
},