From 1ad61a58da0486eb210a6fcf006565524af13f3a Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Sat, 5 Dec 2020 18:21:21 -0700 Subject: [PATCH] Move sync message file to tmp directory --- lib/database.js | 2 +- scripts/sync.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/database.js b/lib/database.js index f5df620..c13c7da 100644 --- a/lib/database.js +++ b/lib/database.js @@ -247,7 +247,7 @@ module.exports = { }, check_show_sync_message: function() { - return fs.existsSync('./show_sync_message.tmp'); + return fs.existsSync('./tmp/show_sync_message.tmp'); }, update_label: function(hash, message, cb){ diff --git a/scripts/sync.js b/scripts/sync.js index cdd6032..e472a1e 100644 --- a/scripts/sync.js +++ b/scripts/sync.js @@ -400,7 +400,7 @@ if (database == 'peers') { function check_show_sync_message(blocks_to_sync) { var retVal = false; - var filePath = './show_sync_message.tmp'; + var filePath = './tmp/show_sync_message.tmp'; // Check if there are more than 1000 blocks to index if (blocks_to_sync > 1000) { // Check if the show sync stub file already exists @@ -416,7 +416,7 @@ function check_show_sync_message(blocks_to_sync) { } function remove_sync_message() { - var filePath = './show_sync_message.tmp'; + var filePath = './tmp/show_sync_message.tmp'; // Check if the show sync stub file exists if (fs.existsSync(filePath)) { // File exists, so delete it now