commit: 813cbffb98449a5fb5485766e6738d52a30e9f75 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Sat Feb 21 21:44:19 2015 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Sat Feb 21 21:44:19 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=813cbffb
Hotfix the Maildir handling to not need our --fix renaming of files. Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> --- ag | 1 + lib/hotfixes.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/ag b/ag index 20fce8f..742abee 100755 --- a/ag +++ b/ag @@ -11,6 +11,7 @@ require_relative 'lib/utils' require_relative 'lib/threading' require_relative 'lib/rendering' require_relative 'lib/storage' +require_relative 'lib/hotfixes' $options = OpenStruct.new $options.action = nil diff --git a/lib/hotfixes.rb b/lib/hotfixes.rb new file mode 100644 index 0000000..2dc8fc9 --- /dev/null +++ b/lib/hotfixes.rb @@ -0,0 +1,12 @@ +# Hotfixes for other classes + +# If the INFO block contains multiple colons, @info will be wrong. +class Maildir::Message + protected + # Sets dir, unique_name, and info based on the key + def parse_key(key) + @dir, filename = key.split(File::SEPARATOR) + @dir = @dir.to_sym + @unique_name, @info = filename.split(COLON, 2) + end +end
