Skip to content

Commit

Permalink
Update PR
Browse files Browse the repository at this point in the history
* Update PR
  • Loading branch information
abraunegg committed Oct 10, 2023
1 parent 82bd593 commit d893ea5
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/onedrive.d
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,23 @@ class OneDriveApi {
string[] authFiles = authFilesString.split(":");
string authUrl = authFiles[0];
string responseUrl = authFiles[1];
auto authUrlFile = File(authUrl, "w");
authUrlFile.write(url);
authUrlFile.close();

try {
auto authUrlFile = File(authUrl, "w");
authUrlFile.write(url);
authUrlFile.close();
} catch (FileException e) {
// There was a file system error
// display the error message
displayFileSystemErrorMessage(e.msg, getFunctionName!({}));
exit(-1);
} catch (ErrnoException e) {
// There was a file system error
// display the error message
displayFileSystemErrorMessage(e.msg, getFunctionName!({}));
exit(-1);
}

log.log("Client requires authentication before proceeding. Waiting for --auth-files elements to be available.");

while (!exists(responseUrl)) {
Expand Down

0 comments on commit d893ea5

Please sign in to comment.