Skip to content

Commit 7b1643d

Browse files
committed
Update onedrive.d
* update how create subscription is performed and what resourceItem path is used
1 parent 848ef00 commit 7b1643d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/onedrive.d

+11-2
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,19 @@ class OneDriveApi {
741741
}
742742

743743
JSONValue createSubscription(string notificationUrl, SysTime expirationDateTime) {
744-
string driveId = appConfig.getValueString("drive_id");
744+
string driveId;
745745
string url = subscriptionUrl;
746746

747-
// Create a resource item based on if we have a driveId
747+
// What do we set for driveId
748+
if (appConfig.getValueString("drive_id").length) {
749+
// Use the 'config' file option
750+
driveId = appConfig.getValueString("drive_id");
751+
} else {
752+
// use appConfig.defaultDriveId
753+
driveId = appConfig.defaultDriveId;
754+
}
755+
756+
// Create a resource item based on if we have a driveId now configured
748757
string resourceItem;
749758
if (driveId.length) {
750759
resourceItem = "/drives/" ~ driveId ~ "/root";

0 commit comments

Comments
 (0)