mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-02 14:12:52 +02:00
Fix for extra encoded quotation marks surrounding Docker environment variables (#2319)
* Fix for extra encoded quotation marks surrounding Docker environment variables --------- Co-authored-by: Hattum van <Nigel.van.Hattum@rabobank.nl> Co-authored-by: abraunegg <alex.braunegg@gmail.com>
This commit is contained in:
parent
5b14157b09
commit
52b1276282
|
@ -675,7 +675,13 @@ final class Config
|
|||
setValueString("skip_dir", configFileSkipDir);
|
||||
}
|
||||
}
|
||||
|
||||
// --single-directory Strip quotation marks from path
|
||||
// This is an issue when using ONEDRIVE_SINGLE_DIRECTORY with Docker
|
||||
if (key == "single_directory") {
|
||||
// Strip quotation marks from provided path
|
||||
string configSingleDirectory = strip(to!string(c.front.dup), "\"");
|
||||
setValueString("single_directory", configSingleDirectory);
|
||||
}
|
||||
// Azure AD Configuration
|
||||
if (key == "azure_ad_endpoint") {
|
||||
string azureConfigValue = c.front.dup;
|
||||
|
|
|
@ -1370,6 +1370,14 @@ int main(string[] args)
|
|||
log.error("ERROR: Unsupported account type for syncing OneDrive Business Shared Folders");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure that the value stored for cfg.getValueString("single_directory") does not contain any extra quotation marks
|
||||
if (cfg.getValueString("single_directory") != ""){
|
||||
string originalSingleDirectoryValue = cfg.getValueString("single_directory");
|
||||
// Strip quotation marks from provided path to ensure no issues within a Docker environment when using passed in values
|
||||
string updatedSingleDirectoryValue = strip(originalSingleDirectoryValue, "\"");
|
||||
cfg.setValueString("single_directory", updatedSingleDirectoryValue);
|
||||
}
|
||||
|
||||
// Are we displaying the sync status of the client?
|
||||
if (cfg.getValueBool("display_sync_status")) {
|
||||
|
|
Loading…
Reference in a new issue