]> git.notmuchmail.org Git - sup/commitdiff
made comparisons in "source_for" be based on uri, not string (so that trailing
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 8 Jan 2007 18:27:33 +0000 (18:27 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 8 Jan 2007 18:27:33 +0000 (18:27 +0000)
slashes, etc. are irrelevant)

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@226 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup-import
lib/sup/source.rb

index b429b43f94d97c3578e7d0bc876f03f2a4b56673..705a737dd93652028c1fae268de1fbcda8bb3c2c 100644 (file)
@@ -128,6 +128,7 @@ index.load
 sources = ARGV.map do |uri|
   uri = "mbox://#{uri}" unless uri =~ %r!://!
   source = index.source_for uri
+  puts "source for #{uri} is #{source}"
   unless source
     source = 
       case uri
index 59b8b70bfe615289db6834a809be3f1de7461aa7..9571d6a12d822eff7693d3d02c2014792c2b8331 100644 (file)
@@ -87,7 +87,7 @@ class Source
       true
     end
   end
-  def is_source_for? s; to_s == s; end
+  def is_source_for? uri; URI(self.uri) == URI(uri); end
 
   def each
     return if broken?