create backup only when receiver found
This commit is contained in:
@@ -11,14 +11,16 @@ struct TransferState {
|
||||
std::atomic<uint64_t> bytes_total{0};
|
||||
|
||||
std::string status;
|
||||
std::string fail_reason;
|
||||
mutable std::mutex status_mutex;
|
||||
|
||||
void reset() {
|
||||
done = false;
|
||||
cancelled = false;
|
||||
done = false;
|
||||
cancelled = false;
|
||||
connection_failed = false;
|
||||
bytes_done = 0;
|
||||
bytes_total = 0;
|
||||
bytes_done = 0;
|
||||
bytes_total = 0;
|
||||
fail_reason.clear();
|
||||
std::lock_guard<std::mutex> lock(status_mutex);
|
||||
status.clear();
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,12 +1,11 @@
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
namespace fs = std::filesystem;
|
||||
using path = fs::path;
|
||||
#include <switch.h>
|
||||
|
||||
int transfer_files(path directory);
|
||||
int transfer_files(size_t index, AccountUid uid);
|
||||
bool isClientTransferDone();
|
||||
bool isClientTransferCancelled();
|
||||
bool isClientConnectionFailed();
|
||||
void cancelClientTransfer();
|
||||
double getClientProgress();
|
||||
std::string getClientStatusText();
|
||||
std::string getClientFailReason();
|
||||
|
||||
Reference in New Issue
Block a user