"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
cmd: make exit code 8 for --max-transfer exceeded
Nick Craig-Wood21383877df3c
diff --git a/cmd/cmd.go b/cmd/cmd.goindex 6a6a51f62..396803594 100644--- a/cmd/cmd.go+++ b/cmd/cmd.go@@ -62,6 +62,7 @@ const (exitCodeRetryErrorexitCodeNoRetryErrorexitCodeFatalError+ exitCodeTransferExceeded)// Root is the main rclone command@@ -461,15 +462,17 @@ func resolveExitCode(err error) {os.Exit(exitCodeSuccess)}- err = errors.Cause(err)+ _, unwrapped := fserrors.Cause(err)switch {- case err == fs.ErrorDirNotFound:+ case unwrapped == fs.ErrorDirNotFound:os.Exit(exitCodeDirNotFound)- case err == fs.ErrorObjectNotFound:+ case unwrapped == fs.ErrorObjectNotFound:os.Exit(exitCodeFileNotFound)- case err == errorUncategorized:+ case unwrapped == errorUncategorized:os.Exit(exitCodeUncategorizedError)+ case unwrapped == accounting.ErrorMaxTransferLimitReached:+ os.Exit(exitCodeTransferExceeded)case fserrors.ShouldRetry(err):os.Exit(exitCodeRetryError)case fserrors.IsNoRetryError(err):diff --git a/docs/content/docs.md b/docs/content/docs.mdindex 2489c9cda..2b4338d6a 100644--- a/docs/content/docs.md+++ b/docs/content/docs.md@@ -543,6 +543,8 @@ Defaults to off.When the limit is reached all transfers will stop immediately.+Rclone will exit with exit code 8 if the transfer limit is reached.+### --modify-window=TIME ###When checking whether a file has been modified, this is the maximum@@ -1097,6 +1099,7 @@ it will log a high priority message if the retry was successful.* `5` - Temporary error (one that more retries might fix) (Retry errors)* `6` - Less serious errors (like 461 errors from dropbox) (NoRetry errors)* `7` - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors)+ * `8` - Transfer exceeded - limit set by --max-transfer reachedEnvironment Variables---------------------