Update --force and --force-sync

* --force and --resync cannot be used together as --resync blows away the database, thus there is no way to calculate large local deletes
* Update --force-sync documentation
This commit is contained in:
abraunegg 2026-01-03 17:37:11 +11:00
commit 02d170d9b5
2 changed files with 7 additions and 1 deletions

View file

@ -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:

View file

@ -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 occured");
operationalConflictDetected = true;
}
// Return bool value indicating if we have an operational conflict
return operationalConflictDetected;