mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-18 05:36:41 +02:00
Restore i386 build using Debian 12
* Restore i386 build using Debian 12 * Tested on i386 and x86_64 * ARM64 and ARMHF not yet tested / validated
This commit is contained in:
parent
15350841ba
commit
86b4cd3452
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
- flavor: debian
|
- flavor: debian
|
||||||
dockerfile: ./contrib/docker/Dockerfile-debian
|
dockerfile: ./contrib/docker/Dockerfile-debian
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/v7
|
||||||
- flavor: alpine
|
- flavor: alpine
|
||||||
dockerfile: ./contrib/docker/Dockerfile-alpine
|
dockerfile: ./contrib/docker/Dockerfile-alpine
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
@ -5,10 +5,10 @@ This client can be run as a Docker container, with 3 available container base op
|
||||||
|----------------|-------------|----------------------------------------------------------------|:------:|:------:|:-----:|:-------:|
|
|----------------|-------------|----------------------------------------------------------------|:------:|:------:|:-----:|:-------:|
|
||||||
| Alpine Linux | edge-alpine | Docker container based on Alpine 3.18 using 'master' |❌|✔|❌|✔|
|
| Alpine Linux | edge-alpine | Docker container based on Alpine 3.18 using 'master' |❌|✔|❌|✔|
|
||||||
| Alpine Linux | alpine | Docker container based on Alpine 3.18 using latest release |❌|✔|❌|✔|
|
| Alpine Linux | alpine | Docker container based on Alpine 3.18 using latest release |❌|✔|❌|✔|
|
||||||
| Debian | debian | Docker container based on Debian Stable using latest release |❌|✔|✔|✔|
|
| Debian | debian | Docker container based on Debian Stable using latest release |✔|✔|✔|✔|
|
||||||
| Debian | edge | Docker container based on Debian Stable using 'master' |❌|✔|✔|✔|
|
| Debian | edge | Docker container based on Debian Stable using 'master' |✔|✔|✔|✔|
|
||||||
| Debian | edge-debian | Docker container based on Debian Stable using 'master' |❌|✔|✔|✔|
|
| Debian | edge-debian | Docker container based on Debian Stable using 'master' |✔|✔|✔|✔|
|
||||||
| Debian | latest | Docker container based on Debian Stable using latest release |❌|✔|✔|✔|
|
| Debian | latest | Docker container based on Debian Stable using latest release |✔|✔|✔|✔|
|
||||||
| Fedora | edge-fedora | Docker container based on Fedora 38 using 'master' |❌|✔|❌|✔|
|
| Fedora | edge-fedora | Docker container based on Fedora 38 using 'master' |❌|✔|❌|✔|
|
||||||
| Fedora | fedora | Docker container based on Fedora 38 using latest release |❌|✔|❌|✔|
|
| Fedora | fedora | Docker container based on Fedora 38 using latest release |❌|✔|❌|✔|
|
||||||
|
|
||||||
|
|
|
@ -166,10 +166,10 @@ struct Action {
|
||||||
|
|
||||||
struct ActionHolder {
|
struct ActionHolder {
|
||||||
Action[] actions;
|
Action[] actions;
|
||||||
ulong[string] srcMap;
|
size_t[string] srcMap;
|
||||||
|
|
||||||
void append(ActionType type, string src, string dst=null) {
|
void append(ActionType type, string src, string dst=null) {
|
||||||
ulong[] pendingTargets;
|
size_t[] pendingTargets;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ActionType.changed:
|
case ActionType.changed:
|
||||||
if (src in srcMap && actions[srcMap[src]].type == ActionType.changed) {
|
if (src in srcMap && actions[srcMap[src]].type == ActionType.changed) {
|
||||||
|
@ -181,7 +181,7 @@ struct ActionHolder {
|
||||||
break;
|
break;
|
||||||
case ActionType.deleted:
|
case ActionType.deleted:
|
||||||
if (src in srcMap) {
|
if (src in srcMap) {
|
||||||
ulong pendingTarget = srcMap[src];
|
size_t pendingTarget = srcMap[src];
|
||||||
// Skip operations require reading local file that is gone
|
// Skip operations require reading local file that is gone
|
||||||
switch (actions[pendingTarget].type) {
|
switch (actions[pendingTarget].type) {
|
||||||
case ActionType.changed:
|
case ActionType.changed:
|
||||||
|
|
|
@ -994,7 +994,7 @@ class OneDriveApi {
|
||||||
bool barInit = false;
|
bool barInit = false;
|
||||||
real previousProgressPercent = -1.0;
|
real previousProgressPercent = -1.0;
|
||||||
real percentCheck = 5.0;
|
real percentCheck = 5.0;
|
||||||
long segmentCount = -1;
|
size_t segmentCount = -1;
|
||||||
|
|
||||||
// Setup progress bar to display
|
// Setup progress bar to display
|
||||||
curlEngine.http.onProgress = delegate int(size_t dltotal, size_t dlnow, size_t ultotal, size_t ulnow) {
|
curlEngine.http.onProgress = delegate int(size_t dltotal, size_t dlnow, size_t ultotal, size_t ulnow) {
|
||||||
|
|
16
src/sync.d
16
src/sync.d
|
@ -958,7 +958,7 @@ class SyncEngine {
|
||||||
// Are there items to process?
|
// Are there items to process?
|
||||||
if (jsonItemsToProcess.length > 0) {
|
if (jsonItemsToProcess.length > 0) {
|
||||||
// Lets deal with the JSON items in a batch process
|
// Lets deal with the JSON items in a batch process
|
||||||
ulong batchSize = 500;
|
size_t batchSize = 500;
|
||||||
ulong batchCount = (jsonItemsToProcess.length + batchSize - 1) / batchSize;
|
ulong batchCount = (jsonItemsToProcess.length + batchSize - 1) / batchSize;
|
||||||
ulong batchesProcessed = 0;
|
ulong batchesProcessed = 0;
|
||||||
|
|
||||||
|
@ -2030,7 +2030,7 @@ class SyncEngine {
|
||||||
// Download new file items as identified
|
// Download new file items as identified
|
||||||
void downloadOneDriveItems() {
|
void downloadOneDriveItems() {
|
||||||
// Lets deal with all the JSON items that need to be downloaded in a batch process
|
// Lets deal with all the JSON items that need to be downloaded in a batch process
|
||||||
ulong batchSize = appConfig.getValueLong("threads");
|
size_t batchSize = to!int(appConfig.getValueLong("threads"));
|
||||||
ulong batchCount = (fileJSONItemsToDownload.length + batchSize - 1) / batchSize;
|
ulong batchCount = (fileJSONItemsToDownload.length + batchSize - 1) / batchSize;
|
||||||
ulong batchesProcessed = 0;
|
ulong batchesProcessed = 0;
|
||||||
|
|
||||||
|
@ -3619,7 +3619,7 @@ class SyncEngine {
|
||||||
void processChangedLocalItemsToUpload() {
|
void processChangedLocalItemsToUpload() {
|
||||||
|
|
||||||
// Each element in this array 'databaseItemsWhereContentHasChanged' is an Database Item ID that has been modified locally
|
// Each element in this array 'databaseItemsWhereContentHasChanged' is an Database Item ID that has been modified locally
|
||||||
ulong batchSize = appConfig.getValueLong("threads");
|
size_t batchSize = to!int(appConfig.getValueLong("threads"));
|
||||||
ulong batchCount = (databaseItemsWhereContentHasChanged.length + batchSize - 1) / batchSize;
|
ulong batchCount = (databaseItemsWhereContentHasChanged.length + batchSize - 1) / batchSize;
|
||||||
ulong batchesProcessed = 0;
|
ulong batchesProcessed = 0;
|
||||||
|
|
||||||
|
@ -5012,7 +5012,7 @@ class SyncEngine {
|
||||||
// Upload new file items as identified
|
// Upload new file items as identified
|
||||||
void uploadNewLocalFileItems() {
|
void uploadNewLocalFileItems() {
|
||||||
// Lets deal with the new local items in a batch process
|
// Lets deal with the new local items in a batch process
|
||||||
ulong batchSize = appConfig.getValueLong("threads");
|
size_t batchSize = to!int(appConfig.getValueLong("threads"));
|
||||||
ulong batchCount = (newLocalFilesToUploadToOneDrive.length + batchSize - 1) / batchSize;
|
ulong batchCount = (newLocalFilesToUploadToOneDrive.length + batchSize - 1) / batchSize;
|
||||||
ulong batchesProcessed = 0;
|
ulong batchesProcessed = 0;
|
||||||
|
|
||||||
|
@ -5689,10 +5689,10 @@ class SyncEngine {
|
||||||
// Session JSON needs to contain valid elements
|
// Session JSON needs to contain valid elements
|
||||||
// Get the offset details
|
// Get the offset details
|
||||||
ulong fragmentSize = 10 * 2^^20; // 10 MiB
|
ulong fragmentSize = 10 * 2^^20; // 10 MiB
|
||||||
ulong fragmentCount = 0;
|
size_t fragmentCount = 0;
|
||||||
ulong fragSize = 0;
|
ulong fragSize = 0;
|
||||||
ulong offset = uploadSessionData["nextExpectedRanges"][0].str.splitter('-').front.to!ulong;
|
ulong offset = uploadSessionData["nextExpectedRanges"][0].str.splitter('-').front.to!ulong;
|
||||||
size_t expected_total_fragments = cast(ulong) ceil(double(thisFileSize) / double(fragmentSize));
|
size_t expected_total_fragments = cast(size_t) ceil(double(thisFileSize) / double(fragmentSize));
|
||||||
ulong start_unix_time = Clock.currTime.toUnixTime();
|
ulong start_unix_time = Clock.currTime.toUnixTime();
|
||||||
int h, m, s;
|
int h, m, s;
|
||||||
string etaString;
|
string etaString;
|
||||||
|
@ -7911,7 +7911,7 @@ class SyncEngine {
|
||||||
// there are valid items to resume upload
|
// there are valid items to resume upload
|
||||||
|
|
||||||
// Lets deal with all the JSON items that need to be reumed for upload in a batch process
|
// Lets deal with all the JSON items that need to be reumed for upload in a batch process
|
||||||
ulong batchSize = appConfig.getValueLong("threads");
|
size_t batchSize = to!int(appConfig.getValueLong("threads"));
|
||||||
ulong batchCount = (jsonItemsToResumeUpload.length + batchSize - 1) / batchSize;
|
ulong batchCount = (jsonItemsToResumeUpload.length + batchSize - 1) / batchSize;
|
||||||
ulong batchesProcessed = 0;
|
ulong batchesProcessed = 0;
|
||||||
|
|
||||||
|
@ -8084,7 +8084,7 @@ class SyncEngine {
|
||||||
|
|
||||||
// Function to process the path by removing prefix up to ':' - remove '/drive/root:' from a path string
|
// Function to process the path by removing prefix up to ':' - remove '/drive/root:' from a path string
|
||||||
string processPathToRemoveRootReference(ref string pathToCheck) {
|
string processPathToRemoveRootReference(ref string pathToCheck) {
|
||||||
long colonIndex = pathToCheck.indexOf(":");
|
size_t colonIndex = pathToCheck.indexOf(":");
|
||||||
if (colonIndex != -1) {
|
if (colonIndex != -1) {
|
||||||
addLogEntry("Updating " ~ pathToCheck ~ " to remove prefix up to ':'", ["debug"]);
|
addLogEntry("Updating " ~ pathToCheck ~ " to remove prefix up to ':'", ["debug"]);
|
||||||
pathToCheck = pathToCheck[colonIndex + 1 .. $];
|
pathToCheck = pathToCheck[colonIndex + 1 .. $];
|
||||||
|
|
Loading…
Reference in a new issue