diff --git a/app/logical/remote_file_manager.rb b/app/logical/remote_file_manager.rb index c67266fbe..ac63e2949 100644 --- a/app/logical/remote_file_manager.rb +++ b/app/logical/remote_file_manager.rb @@ -18,8 +18,9 @@ class RemoteFileManager ftp.rename!(temp_path, path) rescue Net::SFTP::StatusException # this typically means the file already exists - # so just clean up - ftp.remove(temp_path) + # so delete and try renaming again + ftp.remove!(path) + ftp.rename!(temp_path, path) end end end diff --git a/app/views/posts/partials/index/_missed_search_count.html.erb b/app/views/posts/partials/index/_missed_search_count.html.erb index 59a4d91db..5263700d2 100644 --- a/app/views/posts/partials/index/_missed_search_count.html.erb +++ b/app/views/posts/partials/index/_missed_search_count.html.erb @@ -1,7 +1,7 @@