diff options
author | Shackra Sislock <jorgean@lavabit.com> | 2013-07-04 21:52:02 -0600 |
---|---|---|
committer | Shackra Sislock <jorgean@lavabit.com> | 2013-07-04 21:52:02 -0600 |
commit | cd298e9e8d80d387472058ff4b089f0ee509d644 (patch) | |
tree | d00e711db4fa42f10698791204a1e64ba5611f3c /libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch | |
parent | 64e1664807a6e37d4fdfc35d271028104b54c4a1 (diff) | |
parent | 91bd98130ae07e48bd945b0b87e51a117c29ad6f (diff) | |
download | abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.tar.gz abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.tar.bz2 abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.zip |
updating my branches
Diffstat (limited to 'libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch')
-rw-r--r-- | libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch b/libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch new file mode 100644 index 000000000..f5b7c8e00 --- /dev/null +++ b/libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch @@ -0,0 +1,57 @@ +------------------------------------------------------------ +revno: 291 +committer: Michał Masłowski <mtjm@mtjm.eu> +branch nick: gloobus-preview +timestamp: Sun 2013-06-23 14:43:35 +0200 +message: + Use bsdtar to open RAR archives if unrar is not available. + + Needs bsdtar from libarchive 3.0 or newer, not tested with older + versions nor checking for them. +diff: +=== modified file 'src/plugin-compressed/plugin-compressed.cpp' +--- src/plugin-compressed/plugin-compressed.cpp 2012-04-06 11:25:47 +0000 ++++ src/plugin-compressed/plugin-compressed.cpp 2013-06-23 12:43:35 +0000 +@@ -52,8 +52,9 @@ + cmd_args.push_back("--"); + line_parser = &iCompressed::parse_line_7z; + } +- else if ( type == GP_COMPRESSED_RAR +- || type == GP_COMPRESSED_RAR_X ) ++ else if ( (type == GP_COMPRESSED_RAR ++ || type == GP_COMPRESSED_RAR_X) ++ && interface::is_program_available("unrar") ) + { + cmd_args.push_back("unrar"); + cmd_args.push_back("vb"); +@@ -70,9 +71,15 @@ + || type == GP_COMPRESSED_TAR_LZOP + || type == GP_COMPRESSED_TAR_X + || type == GP_COMPRESSED_TAR_XZ +- || type == GP_COMPRESSED_TAR_Z ) ++ || type == GP_COMPRESSED_TAR_Z ++ || type == GP_COMPRESSED_RAR ++ || type == GP_COMPRESSED_RAR_X ) + { +- cmd_args.push_back("tar"); ++ if ( type == GP_COMPRESSED_RAR ++ || type == GP_COMPRESSED_RAR_X ) ++ cmd_args.push_back("bsdtar"); ++ else ++ cmd_args.push_back("tar"); + cmd_args.push_back("-tf"); + line_parser = &iCompressed::parse_line_rar; + } + +=== modified file 'src/plugin-compressed/plugin-compressed.h' +--- src/plugin-compressed/plugin-compressed.h 2010-03-27 15:55:08 +0000 ++++ src/plugin-compressed/plugin-compressed.h 2013-06-23 12:43:35 +0000 +@@ -102,7 +102,7 @@ + PluginManager::register_filetype(GP_COMPRESSED_7Z, 1); + } + +-if(interface::is_program_available("unrar")) { ++if(interface::is_program_available("unrar") || interface::is_program_available("bsdtar")) { + PluginManager::register_filetype(GP_COMPRESSED_RAR, 1); + PluginManager::register_filetype(GP_COMPRESSED_RAR_X, 1); + } |