diff --git a/docs/application-config-options.md b/docs/application-config-options.md index 73696d16..d76e1e28 100644 --- a/docs/application-config-options.md +++ b/docs/application-config-options.md @@ -1427,7 +1427,7 @@ _**Usage Example:**_ `onedrive --sync --verbose --force` ### CLI Option: --force-sync _**Description:**_ This CLI option enables the syncing of a specific directory, using the Client Side Filtering application defaults, overriding any user application configuration. -_**Usage Example:**_ `onedrive --sync --verbose --force-sync --single-directory 'Data' +_**Usage Example:**_ `onedrive --sync --verbose --force-sync --single-directory 'Data'` > [!NOTE] > When this option is used, you will be presented with the following warning and risk acceptance: diff --git a/src/config.d b/src/config.d index af347754..ad004262 100644 --- a/src/config.d +++ b/src/config.d @@ -2555,6 +2555,12 @@ class ApplicationConfig { addLogEntry("ERROR: 'use_intune_sso' and 'use_device_auth' cannot be used together"); operationalConflictDetected = true; } + + // --force and --resync cannot be used together as --resync blows away the database, thus there is no way to calculate large local deletes + if ((getValueBool("force")) && (getValueBool("resync"))) { + addLogEntry("ERROR: --force and --resync cannot be used together as there is zero way to determine that a big delete has occurred"); + operationalConflictDetected = true; + } // Return bool value indicating if we have an operational conflict return operationalConflictDetected;