From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D8819138A87 for ; Sat, 21 Feb 2015 21:45:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C6B6E09AB; Sat, 21 Feb 2015 21:45:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 068A7E09AB for ; Sat, 21 Feb 2015 21:45:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2CD01340956 for ; Sat, 21 Feb 2015 21:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1213E12432 for ; Sat, 21 Feb 2015 21:45:08 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1424555059.813cbffb98449a5fb5485766e6738d52a30e9f75.robbat2@gentoo> Subject: [gentoo-commits] proj/ag:master commit in: /, lib/ X-VCS-Repository: proj/ag X-VCS-Files: ag lib/hotfixes.rb X-VCS-Directories: lib/ / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 813cbffb98449a5fb5485766e6738d52a30e9f75 X-VCS-Branch: master Date: Sat, 21 Feb 2015 21:45:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a85d5cbc-6567-4e2e-a803-5e80b7e0cefd X-Archives-Hash: 61a63743e996eaf5e4cc53ec7c09e050 commit: 813cbffb98449a5fb5485766e6738d52a30e9f75 Author: Robin H. Johnson gentoo org> AuthorDate: Sat Feb 21 21:44:19 2015 +0000 Commit: Robin H. Johnson gentoo 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 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