diff --git a/Makefile b/Makefile index 9b044c4be..db82b7216 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DC = dmd -DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J. +DFLAGS = -w -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J. PREFIX = /usr/local DOCDIR = $(PREFIX)/share/doc/onedrive MANDIR = $(PREFIX)/share/man/man1 diff --git a/src/onedrive.d b/src/onedrive.d index b2d95bf77..dd28c8b22 100644 --- a/src/onedrive.d +++ b/src/onedrive.d @@ -652,7 +652,6 @@ final class OneDriveApi // "else" default: throw new OneDriveException(http.statusLine.code, http.statusLine.reason); - break; } } @@ -662,7 +661,7 @@ final class OneDriveApi { // 412 - Precondition Failed case 412: - throw new OneDriveException(http.statusLine.code, http.statusLine.reason); + log.vlog("OneDrive returned a 'HTTP 412 - Precondition Failed' - gracefully handling error"); break; // Server side (OneDrive) Errors @@ -679,7 +678,6 @@ final class OneDriveApi default: if (http.statusLine.code / 100 != 2 && http.statusLine.code != 302) { throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response); - break; } } }