mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-05 07:23:21 +02:00
Support DMD 2.097.0 as compiler (#1505)
* Support DMD 2.097.0 as compiler and resolve deprecation messages
This commit is contained in:
parent
16fdd928b6
commit
761cf3eb87
|
@ -154,6 +154,7 @@ void notify(T...)(T args)
|
|||
|
||||
private void logfileWriteLine(T...)(T args)
|
||||
{
|
||||
static import std.exception;
|
||||
// Write to log file
|
||||
string logFileName = .logFilePath ~ .username ~ ".onedrive.log";
|
||||
auto currentTime = Clock.currTime();
|
||||
|
|
|
@ -163,7 +163,7 @@ class Notification {
|
|||
|
||||
this(in char[] summary, in char[] body_, in char[] icon="")
|
||||
in { assert(is_initted(), "call dnotify.init() before using Notification"); }
|
||||
body {
|
||||
do {
|
||||
this.summary = summary;
|
||||
this.body_ = body_;
|
||||
this.icon = icon;
|
||||
|
|
10
src/qxor.d
10
src/qxor.d
|
@ -5,11 +5,11 @@ import std.digest;
|
|||
// https://github.com/OneDrive/onedrive-api-docs/blob/live/docs/code-snippets/quickxorhash.md
|
||||
struct QuickXor
|
||||
{
|
||||
private immutable int widthInBits = 160;
|
||||
private immutable size_t lengthInBytes = (widthInBits - 1) / 8 + 1;
|
||||
private immutable size_t lengthInQWords = (widthInBits - 1) / 64 + 1;
|
||||
private immutable int bitsInLastCell = widthInBits % 64; // 32
|
||||
private immutable int shift = 11;
|
||||
private enum int widthInBits = 160;
|
||||
private enum size_t lengthInBytes = (widthInBits - 1) / 8 + 1;
|
||||
private enum size_t lengthInQWords = (widthInBits - 1) / 64 + 1;
|
||||
private enum int bitsInLastCell = widthInBits % 64; // 32
|
||||
private enum int shift = 11;
|
||||
|
||||
private ulong[lengthInQWords] _data;
|
||||
private ulong _lengthSoFar;
|
||||
|
|
|
@ -2585,6 +2585,7 @@ final class SyncEngine
|
|||
// downloads a File resource
|
||||
private void downloadFileItem(const ref Item item, const(string) path)
|
||||
{
|
||||
static import std.exception;
|
||||
assert(item.type == ItemType.file);
|
||||
write("Downloading file ", path, " ... ");
|
||||
JSONValue fileDetails;
|
||||
|
@ -3825,6 +3826,7 @@ final class SyncEngine
|
|||
// upload new items to OneDrive
|
||||
private void uploadNewItems(const(string) path)
|
||||
{
|
||||
static import std.utf;
|
||||
import std.range : walkLength;
|
||||
import std.uni : byGrapheme;
|
||||
// https://support.microsoft.com/en-us/help/3125202/restrictions-and-limitations-when-you-sync-files-and-folders
|
||||
|
@ -6515,6 +6517,7 @@ final class SyncEngine
|
|||
// Query itemdb.computePath() and catch potential assert when DB consistency issue occurs
|
||||
string computeItemPath(string thisDriveId, string thisItemId)
|
||||
{
|
||||
static import core.exception;
|
||||
string calculatedPath;
|
||||
log.vdebug("Attempting to calculate local filesystem path for ", thisDriveId, " and ", thisItemId);
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue