mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-19 14:16:36 +02:00
Fix to allow non-sync tasks while sync is running (#2112)
* Fix to allow --get-file-link and --list-shared-folders when already running
This commit is contained in:
parent
abc8b58ee7
commit
33423ee441
22
src/main.d
22
src/main.d
|
@ -499,16 +499,17 @@ int main(string[] args)
|
|||
}
|
||||
}
|
||||
|
||||
// dry-run notification and database setup
|
||||
// Are we performing a dry-run or querying an Office 365 Drive ID for a given Office 365 SharePoint Shared Library
|
||||
if ((cfg.getValueBool("dry_run")) || (cfg.getValueString("get_o365_drive_id") != "")) {
|
||||
// is this --dry-run
|
||||
// --dry-run operation notification and database setup
|
||||
// Are we performing any of the following operations?
|
||||
// --dry-run, --list-shared-folders, --get-O365-drive-id, --get-file-link
|
||||
if ((cfg.getValueBool("dry_run")) || (cfg.getValueBool("list_business_shared_folders")) || (!cfg.getValueString("get_o365_drive_id").empty) || (!cfg.getValueString("get_file_link").empty)) {
|
||||
// is this a --list-shared-folders, --get-O365-drive-id, --get-file-link operation
|
||||
if (cfg.getValueBool("dry_run")) {
|
||||
// this is a --dry-run operation
|
||||
log.log("DRY-RUN Configured. Output below shows what 'would' have occurred.");
|
||||
}
|
||||
// is this --get-O365-drive-id
|
||||
if (cfg.getValueString("get_o365_drive_id") != "") {
|
||||
log.log("Using dry-run database copy for O365 Library Details query");
|
||||
} else {
|
||||
// is this a --list-shared-folders, --get-O365-drive-id, --get-file-link operation
|
||||
log.log("Using dry-run database copy for OneDrive API query");
|
||||
}
|
||||
// configure databaseFilePathDryRunGlobal
|
||||
databaseFilePathDryRunGlobal = cfg.databaseFilePathDryRun;
|
||||
|
@ -914,8 +915,9 @@ int main(string[] args)
|
|||
|
||||
// Initialize the item database
|
||||
log.vlog("Opening the item database ...");
|
||||
// Are we performing a dry-run or querying an Office 365 Drive ID for a given Office 365 SharePoint Shared Library
|
||||
if ((cfg.getValueBool("dry_run")) || (cfg.getValueString("get_o365_drive_id") != "")) {
|
||||
// Are we performing any of the following operations?
|
||||
// --dry-run, --list-shared-folders, --get-O365-drive-id, --get-file-link
|
||||
if ((cfg.getValueBool("dry_run")) || (cfg.getValueBool("list_business_shared_folders")) || (!cfg.getValueString("get_o365_drive_id").empty) || (!cfg.getValueString("get_file_link").empty)) {
|
||||
// Load the items-dryrun.sqlite3 file as the database
|
||||
log.vdebug("Using database file: ", asNormalizedPath(databaseFilePathDryRunGlobal));
|
||||
itemDb = new ItemDatabase(databaseFilePathDryRunGlobal);
|
||||
|
|
Loading…
Reference in a new issue