use overwrite semantics for remote file distributor
This commit is contained in:
@@ -18,8 +18,9 @@ class RemoteFileManager
|
|||||||
ftp.rename!(temp_path, path)
|
ftp.rename!(temp_path, path)
|
||||||
rescue Net::SFTP::StatusException
|
rescue Net::SFTP::StatusException
|
||||||
# this typically means the file already exists
|
# this typically means the file already exists
|
||||||
# so just clean up
|
# so delete and try renaming again
|
||||||
ftp.remove(temp_path)
|
ftp.remove!(path)
|
||||||
|
ftp.rename!(temp_path, path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
var tags = $("#tags").val();
|
var tags = $("#tags").val();
|
||||||
if (Danbooru.get_url_parameter("ms") === "1" && tags && tags.length > 0 && $(".post-preview").size() < 10) {
|
if (Danbooru.get_url_parameter("ms") === "1" && tags && tags.length > 0 && $(".post-preview").size() === 0) {
|
||||||
$.post("<%= Danbooru.config.report_server %>/missed_searches", {
|
$.post("<%= Danbooru.config.report_server %>/missed_searches", {
|
||||||
session_id: "<%= session_id %>",
|
session_id: "<%= session_id %>",
|
||||||
tags: $("#tags").val(),
|
tags: $("#tags").val(),
|
||||||
|
|||||||
Reference in New Issue
Block a user