diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-07-12 22:53:11 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-07-12 22:53:11 -0300 |
commit | e14736ca7ac051726b587d8fdb8368be502a9109 (patch) | |
tree | 6a40b3b2de9bf45e8f31ba5fd45ee8f2615bd4ae /libre/gloobus-preview-libre/gloobus-preview-usr-bsdtar-for-rar.patch | |
parent | e6e169990bdfc35fb6151f148510bf3f0da1dc1e (diff) | |
parent | 360a407f262ac47087ff29718465fbfc7765cb73 (diff) | |
download | abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.tar.gz abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.tar.bz2 abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.zip |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
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); + } |