From 8e01976abb786aa2be520a11f6b0ed2126a0319b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 26 Apr 2015 13:28:53 -0400 Subject: [PATCH] Sync: Made more explicit exit codes for various errors --- src/commands/CmdSync.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index 94a41ab80..ae49222dc 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -255,10 +255,13 @@ int CmdSync::execute (std::string& output) else if (upload_count > 0 && download_count > 0) context.footnote (format (STRING_CMD_SYNC_SUCCESS3, upload_count, download_count)); } + + status = 0; } else if (code == "201") { context.footnote (STRING_CMD_SYNC_SUCCESS_NOP); + status = 0; } else if (code == "301") { @@ -266,6 +269,7 @@ int CmdSync::execute (std::string& output) context.config.set ("taskd.server", new_server); context.error (STRING_CMD_SYNC_RELOCATE0); context.error (" " + format (STRING_CMD_SYNC_RELOCATE1, new_server)); + status = 2; } else if (code == "430") {