diff --git a/README.rdoc b/README.rdoc index 309bb68..780db2b 100644 --- a/README.rdoc +++ b/README.rdoc @@ -26,7 +26,7 @@ Add the following to your application's "shard.yml": dependencies: maildir: github: crystallabs/maildir.cr - version 5.0.1 + version 6.0.0 And run "shards install". diff --git a/shard.yml b/shard.yml index efee948..a4192b7 100644 --- a/shard.yml +++ b/shard.yml @@ -1,10 +1,10 @@ name: maildir -version: 5.0.1 +version: 6.0.0 authors: - Davor Ocelic -crystal: 0.32.0 +crystal: 0.34.0 license: MIT diff --git a/src/message.cr b/src/message.cr index e0db994..4f3f520 100644 --- a/src/message.cr +++ b/src/message.cr @@ -207,18 +207,14 @@ class Maildir # false, otherwise reraises Errno::ENOENT protected def guard(reraise = false, &block) yield - rescue e : Errno - if e.errno== Errno::ENOENT - if ok= @old_key - # Restore ourselves to the old state - parse_key(ok) - end + rescue e : File::NotFoundError + if ok= @old_key + # Restore ourselves to the old state + parse_key(ok) + end # # Don't allow further modifications # #freeze - else - raise(Exception.new) - end reraise ? raise(Exception.new) : false end diff --git a/src/version.cr b/src/version.cr index b425356..bb8c574 100644 --- a/src/version.cr +++ b/src/version.cr @@ -1,3 +1,3 @@ class Maildir - VERSION = "5.0.1" + VERSION = "6.0.0" end