diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
commit | 883a720e0efbf44e198dffd8efcf65f8d219b08e (patch) | |
tree | ac18d2ab593fa91dfa1708fa290bb1a2662bdc8e /vendor/plugins | |
parent | d734493ce3bcade2c6a819fc98f9b60c860c3fa7 (diff) | |
parent | f098a984efacc9cb486991e9ea2da206cf853c6e (diff) |
Merge branch 'release/0.5' into develop
Diffstat (limited to 'vendor/plugins')
-rw-r--r-- | vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb index 39cfe929f..70605ad04 100644 --- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb +++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb @@ -584,8 +584,8 @@ module ActsAsXapian end def ActsAsXapian._is_xapian_db(path) - exists = File.exist?(File.join(path, "iamflint")) or File.exist?(File.join(path, "iamchert")) - return exists + is_db = File.exist?(File.join(path, "iamflint")) || File.exist?(File.join(path, "iamchert")) + return is_db end # You must specify *all* the models here, this totally rebuilds the Xapian @@ -633,6 +633,7 @@ module ActsAsXapian # Rename into place temp_path = old_path + ".tmp" if File.exist?(temp_path) + @@db_path = old_path raise "temporary database found " + temp_path + " which is not Xapian flint database, please delete for me" if not ActsAsXapian._is_xapian_db(temp_path) FileUtils.rm_r(temp_path) end @@ -643,7 +644,10 @@ module ActsAsXapian # Delete old database if File.exist?(temp_path) - raise "old database now at " + temp_path + " is not Xapian flint database, please delete for me" if not ActsAsXapian._is_xapian_db(temp_path) + if not ActsAsXapian._is_xapian_db(temp_path) + @@db_path = old_path + raise "old database now at " + temp_path + " is not Xapian flint database, please delete for me" + end FileUtils.rm_r(temp_path) end |