mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 14:32:24 +02:00
Fix misspellings found by codespell
This commit is contained in:
parent
1a88d33be3
commit
4f9d58dc51
|
@ -46,7 +46,7 @@ Check the version of the application you are using `onedrive --version` and ensu
|
|||
If you are not using the above application version or greater, you must upgrade your application to obtain support.
|
||||
|
||||
## Have a Question
|
||||
If you have a question or need something clarified, please raise a new disscussion post [here](https://github.com/abraunegg/onedrive/discussions)
|
||||
If you have a question or need something clarified, please raise a new discussion post [here](https://github.com/abraunegg/onedrive/discussions)
|
||||
|
||||
Be sure to review the Frequently Asked Questions as well before raising a new discussion post.
|
||||
|
||||
|
@ -57,7 +57,7 @@ Refer to [Frequently Asked Questions](https://github.com/abraunegg/onedrive/wiki
|
|||
If you encounter any bugs you can report them here on GitHub. Before filing an issue be sure to:
|
||||
|
||||
1. Check the version of the application you are using `onedrive --version` and ensure that you are running a supported application version. If you are not using a supported application version, you must first upgrade your application to a supported version and then re-test for your issue.
|
||||
2. If you are using a supported applcation version, fill in a new bug report using the [issue template](https://github.com/abraunegg/onedrive/issues/new?template=bug_report.md)
|
||||
2. If you are using a supported application version, fill in a new bug report using the [issue template](https://github.com/abraunegg/onedrive/issues/new?template=bug_report.md)
|
||||
3. Generate a debug log for support using the following [process](https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support)
|
||||
* If you are in *any* way concerned regarding the sensitivity of the data contained with in the verbose debug log file, create a new OneDrive account, configure the client to use that, use *dummy* data to simulate your environment and then replicate your original issue
|
||||
* If you are still concerned, provide an NDA or confidentiality document to sign
|
||||
|
|
|
@ -101,7 +101,7 @@ case $(basename $DC) in
|
|||
VERSION=`$DC --version`
|
||||
# remove everything up to first (
|
||||
VERSION=${VERSION#* (}
|
||||
# remove everthing after ):
|
||||
# remove everything after ):
|
||||
VERSION=${VERSION%%):*}
|
||||
# now version should be something like L.M.N
|
||||
MINVERSION=1.18.0
|
||||
|
@ -162,7 +162,7 @@ dnl value via pkg-config and put it into $def_systemdsystemunitdir
|
|||
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
|
||||
[ dnl true part, so try to determine with pkg-config
|
||||
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
||||
dnl if we cannot find it via pkg-config, *and* the user explicitely passed it in with,
|
||||
dnl if we cannot find it via pkg-config, *and* the user explicitly passed it in with,
|
||||
dnl we warn, and in all cases we unset (set to no) the respective variable
|
||||
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
|
||||
[ dnl we couldn't find the default value via pkg-config
|
||||
|
|
|
@ -246,7 +246,7 @@ If you are experienced with docker and onedrive, you can use the following scrip
|
|||
```bash
|
||||
# Update ONEDRIVE_DATA_DIR with correct OneDrive directory path
|
||||
ONEDRIVE_DATA_DIR="${HOME}/OneDrive"
|
||||
# Create directory if non-existant
|
||||
# Create directory if non-existent
|
||||
mkdir -p ${ONEDRIVE_DATA_DIR}
|
||||
|
||||
firstRun='-d'
|
||||
|
|
|
@ -166,7 +166,7 @@ ExecStart=/usr/local/bin/onedrive --monitor --confdir="/home/myusername/.config/
|
|||
**Note:** When running the client manually, `--confdir="~/.config/......` is acceptable. In a systemd configuration file, the full path must be used. The `~` must be expanded.
|
||||
|
||||
### Step 3: Enable the new systemd service
|
||||
Once the file is correctly editied, you can enable the new systemd service using the following commands.
|
||||
Once the file is correctly edited, you can enable the new systemd service using the following commands.
|
||||
|
||||
#### Red Hat Enterprise Linux, CentOS Linux
|
||||
```text
|
||||
|
|
|
@ -102,7 +102,7 @@ If your system utilises curl < 7.47.0, curl defaults to HTTP/1.1 for HTTPS opera
|
|||
|
||||
If your system utilises curl >= 7.47.0 and < 7.62.0, curl will prefer HTTP/2 for HTTPS but will stick to HTTP/1.1 by default. The client will use HTTP/1.1 for HTTPS operations.
|
||||
|
||||
If your system utilises curl >= 7.62.0, curl defaults to prefer HTTP/2 over HTTP/1.1 by default. The client will utilse HTTP/2 for most HTTPS operations and HTTP/1.1 for others. This difference is governed by the OneDrive platform and not this client.
|
||||
If your system utilises curl >= 7.62.0, curl defaults to prefer HTTP/2 over HTTP/1.1 by default. The client will utilise HTTP/2 for most HTTPS operations and HTTP/1.1 for others. This difference is governed by the OneDrive platform and not this client.
|
||||
|
||||
If you wish to explicitly use HTTP/1.1 you will need to use the `--force-http-11` flag or set the config option `force_http_11 = "true"` to force the application to use HTTP/1.1 otherwise all client operations will use whatever is the curl default for your distribution.
|
||||
|
||||
|
@ -704,7 +704,7 @@ monitor_fullscan_frequency = "24"
|
|||
**Note:** When running in --monitor mode, at application start-up, a full scan will be performed to ensure data integrity. This option has zero effect when running the application in `--synchronize` mode and a full scan will always be performed.
|
||||
|
||||
#### monitor_log_frequency
|
||||
This configuration option controls the output of when logging is performed to detail that a sync is occuring with OneDrive when using `--monitor` mode. The frequency of syncing with OneDrive is controled via 'monitor_interval'.
|
||||
This configuration option controls the output of when logging is performed to detail that a sync is occurring with OneDrive when using `--monitor` mode. The frequency of syncing with OneDrive is controlled via 'monitor_interval'.
|
||||
|
||||
By default without configuration, 'monitor_log_frequency' is set to 6.
|
||||
|
||||
|
@ -725,7 +725,7 @@ Starting a sync with OneDrive
|
|||
Syncing changes from OneDrive ...
|
||||
Sync with OneDrive is complete
|
||||
```
|
||||
**Note:** The additional log output `Performing a database consistency and integrity check on locally stored data ...` will only be displayed when this activity is occuring which is triggered by 'monitor_fullscan_frequency'.
|
||||
**Note:** The additional log output `Performing a database consistency and integrity check on locally stored data ...` will only be displayed when this activity is occurring which is triggered by 'monitor_fullscan_frequency'.
|
||||
|
||||
#### min_notify_changes
|
||||
This option defines the minimum number of pending incoming changes necessary to trigger a desktop notification. This allows controlling the frequency of notifications.
|
||||
|
@ -817,12 +817,12 @@ application_id = "22c49a0d-d21c-4792-aed1-8f163c982546"
|
|||
### How to sync only specific or single directory?
|
||||
There are two methods to achieve this:
|
||||
* Utilise '--single-directory' option to only sync this specific path
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be exluded
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be excluded
|
||||
|
||||
### How to 'skip' directories from syncing?
|
||||
There are several mechanisms available to 'skip' a directory from the sync process:
|
||||
* Utilise 'skip_dir' to configure what directories to skip. Refer to above for configuration advice.
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be exluded
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be excluded
|
||||
|
||||
One further method is to add a '.nosync' empty file to any folder. When this file is present, adding `--check-for-nosync` to your command line will now make the sync process skip any folder where the '.nosync' file is present.
|
||||
|
||||
|
@ -841,12 +841,12 @@ check_nosync = "true"
|
|||
### How to 'skip' files from syncing?
|
||||
There are two methods to achieve this:
|
||||
* Utilise 'skip_file' to configure what files to skip. Refer to above for configuration advice.
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be exluded
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be excluded
|
||||
|
||||
### How to 'skip' dot files and folders from syncing?
|
||||
There are three methods to achieve this:
|
||||
* Utilise 'skip_file' or 'skip_dir' to configure what files or folders to skip. Refer to above for configuration advice.
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be exluded
|
||||
* Utilise 'sync_list' to configure what files and directories to sync, and what should be excluded
|
||||
* Utilise 'skip_dotfiles' to skip any dot file (for example: `.Trash-1000` or `.xdg-volume-info`) from syncing to OneDrive.
|
||||
|
||||
Example:
|
||||
|
@ -976,7 +976,7 @@ Refer to [./advanced-usage.md](advanced-usage.md) for configuration assistance.
|
|||
Monitor mode (`--monitor`) allows the onedrive process to continually monitor your local file system for changes to files.
|
||||
|
||||
Two common errors can occur when using monitor mode:
|
||||
* Intialisation failure
|
||||
* Initialisation failure
|
||||
* Unable to add a new inotify watch
|
||||
|
||||
Both of these errors are local environment issues, where the following system variables need to be increased as the current system values are potentially too low:
|
||||
|
@ -1217,7 +1217,7 @@ journalctl --user-unit=onedrive -f
|
|||
- `# touch /etc/sv/runsvdir-<username>/run`
|
||||
- `# chmod 0755 /etc/sv/runsvdir-<username>/run`
|
||||
|
||||
3. Edit the `run` file with the following contents (priviledges needed)
|
||||
3. Edit the `run` file with the following contents (privileges needed)
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
|
@ -1274,7 +1274,7 @@ for extra details.
|
|||
|
||||
## Additional Configuration
|
||||
### Advanced Configuration of the OneDrive Free Client
|
||||
* Configuring the client to use mulitple OneDrive accounts / configurations, for example:
|
||||
* Configuring the client to use multiple OneDrive accounts / configurations, for example:
|
||||
* Setup to use onedrive with both Personal and Business accounts
|
||||
* Setup to use onedrive with multiple SharePoint Libraries
|
||||
* Configuring the client for use in dual-boot (Windows / Linux) situations
|
||||
|
@ -1313,7 +1313,7 @@ If selinux is enforced and the sync folder is outside of the home folder, as lon
|
|||
sudo semanage fcontext -a -t user_home_t /path/to/onedriveSyncFolder
|
||||
sudo restorecon -R -v /path/to/onedriveSyncFolder
|
||||
```
|
||||
To remove this change from selinux and restore the default behaivor:
|
||||
To remove this change from selinux and restore the default behavior:
|
||||
```text
|
||||
sudo semanage fcontext -d /path/to/onedriveSyncFolder
|
||||
sudo restorecon -R -v /path/to/onedriveSyncFolder
|
||||
|
|
|
@ -127,7 +127,7 @@ ExecStart=/usr/local/bin/onedrive --monitor --confdir="/home/myusername/.config/
|
|||
**Note:** When running the client manually, `--confdir="~/.config/......` is acceptable. In a systemd configuration file, the full path must be used. The `~` must be expanded.
|
||||
|
||||
### Step 3: Enable the new systemd service
|
||||
Once the file is correctly editied, you can enable the new systemd service using the following commands.
|
||||
Once the file is correctly edited, you can enable the new systemd service using the following commands.
|
||||
|
||||
#### Red Hat Enterprise Linux, CentOS Linux
|
||||
```text
|
||||
|
@ -228,7 +228,7 @@ docker run -it --name onedrive -v onedrive_conf_sharepoint_site50:/onedrive/conf
|
|||
```
|
||||
|
||||
#### TIP
|
||||
To avoid 're-authenticating' and 'authorising' each individual Docker container, if all the Docker containers are using the 'same' OneDrive credentials, you can re-use the 'refresh_token' from one Docker container to another by copying this file to the configuration Docker volume of each Docker container.
|
||||
To avoid 're-authenticating' and 'authorising' each individual Docker container, if all the Docker containers are using the 'same' OneDrive credentials, you can reuse the 'refresh_token' from one Docker container to another by copying this file to the configuration Docker volume of each Docker container.
|
||||
|
||||
If the account credentials are different .. you will need to re-authenticate each Docker container individually.
|
||||
|
||||
|
@ -241,7 +241,7 @@ To fix the problem of windows turning all files (that should be kept offline) in
|
|||
|
||||
To find this setting, open the onedrive pop-up window from the taskbar, click "Help & Settings" > "Settings". This opens a new window. Go to the tab "Settings" and look for the section "Files On-Demand".
|
||||
|
||||
After unchecking the option and clicking "OK", the Windows OneDrive client should restart itself and start actually downloading your files so they will truely be available on your disk when offline. These files will then be fully accessible under Linux and the Linux OneDrive client.
|
||||
After unchecking the option and clicking "OK", the Windows OneDrive client should restart itself and start actually downloading your files so they will truly be available on your disk when offline. These files will then be fully accessible under Linux and the Linux OneDrive client.
|
||||
|
||||
| OneDrive Personal | Onedrive Business<br>SharePoint |
|
||||
|---|---|
|
||||
|
@ -257,7 +257,7 @@ The issue here is - how does the client react if the mount point gets removed -
|
|||
|
||||
The client has zero knowledge of any event that causes a mountpoint to become unavailable, thus, the client (if you are running as a service) will assume that you deleted the files, thus, will go ahead and delete all your files on OneDrive. This is most certainly an undesirable action.
|
||||
|
||||
There are a few options here which you can configure in your 'config' file to assist you to prevent this sort of item from occuring:
|
||||
There are a few options here which you can configure in your 'config' file to assist you to prevent this sort of item from occurring:
|
||||
1. classify_as_big_delete
|
||||
2. check_nomount
|
||||
3. check_nosync
|
||||
|
@ -282,7 +282,7 @@ After making this sort of change - test with `--dry-run` so you can see the impa
|
|||
## Upload data from the local ~/OneDrive folder to a specific location on OneDrive
|
||||
In some environments, you may not want your local ~/OneDrive folder to be uploaded directly to the root of your OneDrive account online.
|
||||
|
||||
Unfortunatly, the OneDrive API lacks any facility to perform a re-direction of data during upload.
|
||||
Unfortunately, the OneDrive API lacks any facility to perform a re-direction of data during upload.
|
||||
|
||||
The workaround for this is to structure your local filesystem and reconfigure your client to achieve the desired goal.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RPM Package Build Process
|
||||
The instuctions below have been tested on the following systems:
|
||||
The instructions below have been tested on the following systems:
|
||||
* CentOS 7 x86_64
|
||||
* CentOS 8 x86_64
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Technically, the client is 'working' correctly, as, when moving files, you are '
|
|||
|
||||
**Workaround:**
|
||||
|
||||
If the tracking of moving data to new local directories is requried, it is better to run the client in service mode (`--monitor`) rather than in standalone mode, as the 'move' of files can then be handled at the point when it occurs, so that the data is moved to the new location on OneDrive without the need to be deleted and re-uploaded.
|
||||
If the tracking of moving data to new local directories is required, it is better to run the client in service mode (`--monitor`) rather than in standalone mode, as the 'move' of files can then be handled at the point when it occurs, so that the data is moved to the new location on OneDrive without the need to be deleted and re-uploaded.
|
||||
|
||||
## Application 'stops' running without any visible reason
|
||||
**Issue Tracker:** [#494](https://github.com/abraunegg/onedrive/issues/494), [#753](https://github.com/abraunegg/onedrive/issues/753), [#792](https://github.com/abraunegg/onedrive/issues/792), [#884](https://github.com/abraunegg/onedrive/issues/884), [#1162](https://github.com/abraunegg/onedrive/issues/1162), [#1408](https://github.com/abraunegg/onedrive/issues/1408), [#1520](https://github.com/abraunegg/onedrive/issues/1520), [#1526](https://github.com/abraunegg/onedrive/issues/1526)
|
||||
|
@ -27,7 +27,7 @@ Additionally, this issue has mainly been seen when the client is operating again
|
|||
|
||||
**Explanation:**
|
||||
|
||||
The client is heavily dependant on Curl and OpenSSL to perform the activities with the Microsoft OneDrive service. Generally, when this issue occurs, the following is found in the HTTPS Debug Log:
|
||||
The client is heavily dependent on Curl and OpenSSL to perform the activities with the Microsoft OneDrive service. Generally, when this issue occurs, the following is found in the HTTPS Debug Log:
|
||||
```
|
||||
OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
|
||||
```
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Before reading this document, please ensure you are running application version [![Version](https://img.shields.io/github/v/release/abraunegg/onedrive)](https://github.com/abraunegg/onedrive/releases) or greater. Use `onedrive --version` to determine what application version you are using and upgrade your client if required.
|
||||
|
||||
## Process Overview
|
||||
In some cases it is a requirement to utilise specific Microsoft Azure cloud deployments to conform with data and security reuqirements that requires data to reside within the geographic borders of that country.
|
||||
In some cases it is a requirement to utilise specific Microsoft Azure cloud deployments to conform with data and security requirements that requires data to reside within the geographic borders of that country.
|
||||
Current national clouds that are supported are:
|
||||
* Microsoft Cloud for US Government
|
||||
* Microsoft Cloud Germany
|
||||
|
@ -105,7 +105,7 @@ azure_tenant_id = "insert valid entry here"
|
|||
|
||||
This will configure your client to use the specified tenant id in its Azure AD and Graph endpoint URIs, instead of "common".
|
||||
The tenant id may be the GUID Directory ID (formatted "00000000-0000-0000-0000-000000000000"), or the fully qualified tenant name (e.g. "example.onmicrosoft.us").
|
||||
The GUID Directory ID may be located in the Azure administation page as per [https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id](https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id). Note that you may need to go to your national-deployment-specific administration page, rather than following the links within that document.
|
||||
The GUID Directory ID may be located in the Azure administration page as per [https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id](https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id). Note that you may need to go to your national-deployment-specific administration page, rather than following the links within that document.
|
||||
The tenant name may be obtained by following the PowerShell instructions on [https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id](https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id); it is shown as the "TenantDomain" upon completion of the "Connect-AzureAD" command.
|
||||
|
||||
**Example:**
|
||||
|
|
|
@ -38,7 +38,7 @@ OneDrive Client for Linux is not responsible for the Microsoft OneDrive Service
|
|||
|
||||
To the fullest extent permitted by law, we shall not be liable for any direct, indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from (a) your use or inability to use the Service, or (b) any other matter relating to the Service.
|
||||
|
||||
This limitiation of liability explicitly relates to the use of the OneDrive Client for Linux software and does not affect your rights under the GPLv3.
|
||||
This limitation of liability explicitly relates to the use of the OneDrive Client for Linux software and does not affect your rights under the GPLv3.
|
||||
|
||||
## 7. Changes to Terms
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ This information is specifically for the following platforms and distributions:
|
|||
Whilst there are [onedrive](https://packages.ubuntu.com/search?keywords=onedrive&searchon=names&suite=all§ion=all) Universe packages available for Ubuntu, do not install 'onedrive' from these Universe packages. The default Ubuntu Universe packages are out-of-date and are not supported and should not be used.
|
||||
|
||||
## Determine which instructions to use
|
||||
Ubuntu and its clones are based on various different releases, thus, you must use the correct instructions below, otherwise you may run into package dependancy issues and will be unable to install the client.
|
||||
Ubuntu and its clones are based on various different releases, thus, you must use the correct instructions below, otherwise you may run into package dependency issues and will be unable to install the client.
|
||||
|
||||
### Step 1: Remove any configured PPA and associated 'onedrive' package and systemd service files
|
||||
Many Internet 'help' pages provide inconsistent details on how to install the OneDrive Client for Linux. A number of these websites continue to point users to install the client via the yann1ck PPA repository however this PPA no longer exists and should not be used.
|
||||
|
|
|
@ -1100,7 +1100,7 @@ class Cgi {
|
|||
const(ubyte)[] delegate() readdata = null,
|
||||
// finally, use this to do custom output if needed
|
||||
void delegate(const(ubyte)[]) _rawDataOutput = null,
|
||||
// to flush teh custom output
|
||||
// to flush the custom output
|
||||
void delegate() _flush = null
|
||||
)
|
||||
{
|
||||
|
@ -2226,7 +2226,7 @@ class Cgi {
|
|||
uri ~= "s";
|
||||
uri ~= "://";
|
||||
uri ~= host;
|
||||
/+ // the host has the port so p sure this never needed, cgi on apache and embedded http all do the right hting now
|
||||
/+ // the host has the port so p sure this never needed, cgi on apache and embedded http all do the right thing now
|
||||
version(none)
|
||||
if(!(!port || port == defaultPort)) {
|
||||
uri ~= ":";
|
||||
|
@ -2316,7 +2316,7 @@ class Cgi {
|
|||
|
||||
/// This is like setResponseExpires, but it can be called multiple times. The setting most in the past is the one kept.
|
||||
/// If you have multiple functions, they all might call updateResponseExpires about their own return value. The program
|
||||
/// output as a whole is as cacheable as the least cachable part in the chain.
|
||||
/// output as a whole is as cacheable as the least cacheable part in the chain.
|
||||
|
||||
/// setCache(false) always overrides this - it is, by definition, the strictest anti-cache statement available. If your site outputs sensitive user data, you should probably call setCache(false) when you do, to ensure no other functions will cache the content, as it may be a privacy risk.
|
||||
/// Conversely, setting here overrides setCache(true), since any expiration date is in the past of infinity.
|
||||
|
@ -2328,7 +2328,7 @@ class Cgi {
|
|||
}
|
||||
|
||||
/*
|
||||
/// Set to true if you want the result to be cached publically - that is, is the content shared?
|
||||
/// Set to true if you want the result to be cached publicly - that is, is the content shared?
|
||||
/// Should generally be false if the user is logged in. It assumes private cache only.
|
||||
/// setCache(true) also turns on public caching, and setCache(false) sets to private.
|
||||
void setPublicCaching(bool allowPublicCaches) {
|
||||
|
@ -7289,7 +7289,7 @@ private void serialize(T)(scope void delegate(scope ubyte[]) sink, T t) {
|
|||
} else static assert(0, T.stringof);
|
||||
}
|
||||
|
||||
// all may be stack buffers, so use cautio
|
||||
// all may be stack buffers, so use caution
|
||||
private void deserialize(T)(scope ubyte[] delegate(int sz) get, scope void delegate(T) dg) {
|
||||
static if(is(T == struct)) {
|
||||
T t;
|
||||
|
@ -10178,7 +10178,7 @@ struct Redirection {
|
|||
/++
|
||||
Serves a class' methods, as a kind of low-state RPC over the web. To be used with [dispatcher].
|
||||
|
||||
Usage of this function will add a dependency on [arsd.dom] and [arsd.jsvar] unless you have overriden
|
||||
Usage of this function will add a dependency on [arsd.dom] and [arsd.jsvar] unless you have overridden
|
||||
the presenter in the dispatcher.
|
||||
|
||||
FIXME: explain this better
|
||||
|
@ -10618,7 +10618,7 @@ template urlNamesForMethod(alias method, string default_) {
|
|||
enum AccessCheck {
|
||||
allowed,
|
||||
denied,
|
||||
nonExistant,
|
||||
nonExistent,
|
||||
}
|
||||
|
||||
enum Operation {
|
||||
|
@ -11807,4 +11807,4 @@ Authors: Adam D. Ruppe
|
|||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -76,7 +76,7 @@ final class Config
|
|||
this(string confdirOption)
|
||||
{
|
||||
// default configuration - entries in config file ~/.config/onedrive/config
|
||||
// an entry here means it can be set via the config file if there is a coresponding entry, read from config and set via update_from_args()
|
||||
// an entry here means it can be set via the config file if there is a corresponding entry, read from config and set via update_from_args()
|
||||
stringValues["sync_dir"] = defaultSyncDir;
|
||||
stringValues["skip_file"] = defaultSkipFile;
|
||||
stringValues["skip_dir"] = defaultSkipDir;
|
||||
|
|
|
@ -54,7 +54,7 @@ final class ItemDatabase
|
|||
if (e.msg == "database is locked") {
|
||||
writeln();
|
||||
log.error("ERROR: onedrive application is already running - check system process list for active application instances");
|
||||
log.vlog(" - Use 'sudo ps aufxw | grep onedrive' to potentially determine acive running process");
|
||||
log.vlog(" - Use 'sudo ps aufxw | grep onedrive' to potentially determine active running process");
|
||||
writeln();
|
||||
} else {
|
||||
writeln();
|
||||
|
@ -453,7 +453,7 @@ final class ItemDatabase
|
|||
// National Cloud Deployments (US and DE) do not support /delta as a query
|
||||
// We need to track in the database that this item is in sync
|
||||
// As we query /children to get all children from OneDrive, update anything in the database
|
||||
// to be flagged as not-in-sync, thus, we can use that flag to determing what was previously
|
||||
// to be flagged as not-in-sync, thus, we can use that flag to determine what was previously
|
||||
// in-sync, but now deleted on OneDrive
|
||||
void downgradeSyncStatusFlag(const(char)[] driveId, const(char)[] id)
|
||||
{
|
||||
|
|
18
src/main.d
18
src/main.d
|
@ -218,7 +218,7 @@ int main(string[] args)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Evaluate user repsonse
|
||||
// Evaluate user response
|
||||
if ((to!string(response) == "y") || (to!string(response) == "Y")) {
|
||||
// User has accepted --resync risk to proceed
|
||||
resyncRiskAcceptance = true;
|
||||
|
@ -1049,7 +1049,7 @@ int main(string[] args)
|
|||
cfg.configureRequiredFilePermisions();
|
||||
}
|
||||
|
||||
// configure the sync direcory based on syncDir config option
|
||||
// configure the sync directory based on syncDir config option
|
||||
log.vlog("All operations will be performed in: ", syncDir);
|
||||
try {
|
||||
if (!exists(syncDir)) {
|
||||
|
@ -1170,7 +1170,7 @@ int main(string[] args)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Evaluate user repsonse
|
||||
// Evaluate user response
|
||||
if ((to!string(response) == "y") || (to!string(response) == "Y")) {
|
||||
// User has accepted --force-sync risk to proceed
|
||||
resyncRiskAcceptance = true;
|
||||
|
@ -1321,7 +1321,7 @@ int main(string[] args)
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
// --create-share-link - Are we createing a shareable link for an existing file on OneDrive?
|
||||
// --create-share-link - Are we creating a shareable link for an existing file on OneDrive?
|
||||
if (cfg.getValueString("create_share_link") != "") {
|
||||
// Query OneDrive for the file, and if valid, create a shareable link for the file
|
||||
|
||||
|
@ -1703,7 +1703,7 @@ int main(string[] args)
|
|||
// Display memory details after cleanup
|
||||
if (displayMemoryUsage) log.displayMemoryUsagePostGC();
|
||||
|
||||
// If we did a full scan, make sure we merge the conents of the WAL and SHM to disk
|
||||
// If we did a full scan, make sure we merge the contents of the WAL and SHM to disk
|
||||
if (fullScanRequired) {
|
||||
// Write WAL and SHM data to file for this loop
|
||||
log.vdebug("Merge contents of WAL and SHM files into main database file");
|
||||
|
@ -1948,7 +1948,7 @@ void performSync(SyncEngine sync, string singleDirectory, bool downloadOnly, boo
|
|||
if (fullScanRequired) {
|
||||
log.log("Performing a database consistency and integrity check on locally stored data due to fullscan requirement ... ");
|
||||
sync.scanForDifferencesDatabaseScan(localPath);
|
||||
// handle any inotify events that occured 'whilst' we were scanning the database
|
||||
// handle any inotify events that occurred 'whilst' we were scanning the database
|
||||
m.update(true);
|
||||
} else {
|
||||
log.vdebug("NOT performing Database Integrity Check .. fullScanRequired = FALSE");
|
||||
|
@ -1958,7 +1958,7 @@ void performSync(SyncEngine sync, string singleDirectory, bool downloadOnly, boo
|
|||
// Filesystem walk to find new files not uploaded
|
||||
log.vdebug("Searching local filesystem for new data");
|
||||
sync.scanForDifferencesFilesystemScan(localPath);
|
||||
// handle any inotify events that occured 'whilst' we were scanning the local filesystem
|
||||
// handle any inotify events that occurred 'whilst' we were scanning the local filesystem
|
||||
m.update(true);
|
||||
}
|
||||
|
||||
|
@ -1971,12 +1971,12 @@ void performSync(SyncEngine sync, string singleDirectory, bool downloadOnly, boo
|
|||
}
|
||||
|
||||
// At this point, all OneDrive changes / local changes should be uploaded and in sync
|
||||
// This MAY not be the case when using sync_list, thus a full walk of OneDrive ojects is required
|
||||
// This MAY not be the case when using sync_list, thus a full walk of OneDrive objects is required
|
||||
|
||||
// --synchronize & no sync_list : fullScanRequired = false, syncListConfiguredFullScanOverride = false
|
||||
// --synchronize & sync_list in use : fullScanRequired = false, syncListConfiguredFullScanOverride = true
|
||||
|
||||
// --monitor loops around 12 iterations. On the 1st loop, sets fullScanRequired = true, syncListConfiguredFullScanOverride = true if requried
|
||||
// --monitor loops around 12 iterations. On the 1st loop, sets fullScanRequired = true, syncListConfiguredFullScanOverride = true if required
|
||||
|
||||
// --monitor & no sync_list (loop #1) : fullScanRequired = true, syncListConfiguredFullScanOverride = false
|
||||
// --monitor & no sync_list (loop #2 - #12) : fullScanRequired = false, syncListConfiguredFullScanOverride = false
|
||||
|
|
|
@ -107,7 +107,7 @@ final class Monitor
|
|||
return;
|
||||
}
|
||||
}
|
||||
// is the path exluded by sync_list?
|
||||
// is the path excluded by sync_list?
|
||||
if (selectiveSync.isPathExcludedViaSyncList(buildNormalizedPath(dirname))) {
|
||||
// dont add a watch for this item
|
||||
log.vdebug("Skipping monitoring due to sync_list match: ", dirname);
|
||||
|
@ -137,7 +137,7 @@ final class Monitor
|
|||
log.vdebug("Calling add() for this dirname: ", dirname);
|
||||
add(dirname);
|
||||
|
||||
// if this is a directory, recursivly add this path
|
||||
// if this is a directory, recursively add this path
|
||||
if (isDir(dirname)) {
|
||||
// try and get all the directory entities for this path
|
||||
try {
|
||||
|
@ -205,7 +205,7 @@ final class Monitor
|
|||
// Do we log that we are monitoring this directory?
|
||||
if (isDir(pathname)) {
|
||||
// This is a directory
|
||||
// is the path exluded if skip_dotfiles configured and path is a .folder?
|
||||
// is the path excluded if skip_dotfiles configured and path is a .folder?
|
||||
if ((selectiveSync.getSkipDotfiles()) && (selectiveSync.isDotFile(pathname))) {
|
||||
// no misleading output that we are monitoring this directory
|
||||
return;
|
||||
|
|
|
@ -510,7 +510,7 @@ final class OneDriveApi
|
|||
bool init()
|
||||
{
|
||||
static import std.utf;
|
||||
// detail what we are using for applicaion identification
|
||||
// detail what we are using for application identification
|
||||
log.vdebug("clientId = ", clientId);
|
||||
log.vdebug("companyName = ", companyName);
|
||||
log.vdebug("appTitle = ", appTitle);
|
||||
|
|
24
src/sync.d
24
src/sync.d
|
@ -2451,7 +2451,7 @@ final class SyncEngine
|
|||
// what path are we checking
|
||||
log.vdebug("sync_list item to check: ", path);
|
||||
|
||||
// Unfortunatly there is no avoiding this call to check if the path is excluded|included via sync_list
|
||||
// Unfortunately there is no avoiding this call to check if the path is excluded|included via sync_list
|
||||
if (selectiveSync.isPathExcludedViaSyncList(path)) {
|
||||
// selective sync advised to skip, however is this a file and are we configured to upload / download files in the root?
|
||||
if ((isItemFile(driveItem)) && (cfg.getValueBool("sync_root_files")) && (rootName(path) == "") ) {
|
||||
|
@ -2636,7 +2636,7 @@ final class SyncEngine
|
|||
remoteModifiedTime.fracSecs = Duration.zero;
|
||||
|
||||
// If the timestamp is different, or we are running on a National Cloud Deployment that does not support /delta queries - we have to update the DB with the details from OneDrive
|
||||
// Unfortunatly because of the consequence of Nataional Cloud Deployments not supporting /delta queries, the application uses the local database to flag what is out-of-date / track changes
|
||||
// Unfortunately because of the consequence of Nataional Cloud Deployments not supporting /delta queries, the application uses the local database to flag what is out-of-date / track changes
|
||||
// This means that the constant disk writing to the database fix implemented with https://github.com/abraunegg/onedrive/pull/2004 cannot be utilised when using Nataional Cloud Deployments
|
||||
// as all records are touched / updated when performing the OneDrive sync operations. The only way to change this, is for Microsoft to support /delta queries for Nataional Cloud Deployments
|
||||
if ((localModifiedTime != remoteModifiedTime) || (nationalCloudDeployment)) {
|
||||
|
@ -2716,7 +2716,7 @@ final class SyncEngine
|
|||
log.vlog("Skipping downloading item - .nosync found in parent folder & --check-for-nosync is enabled: ", path);
|
||||
// flag that this download failed, otherwise the 'item' is added to the database - then, as not present on the local disk, would get deleted from OneDrive
|
||||
downloadFailed = true;
|
||||
// clean up this partial file, otherwise every sync we will get theis warning
|
||||
// clean up this partial file, otherwise every sync we will get this warning
|
||||
log.vlog("Removing previous partial file download due to .nosync found in parent folder & --check-for-nosync is enabled");
|
||||
safeRemove(path);
|
||||
return;
|
||||
|
@ -3173,14 +3173,14 @@ final class SyncEngine
|
|||
// downloaded file size does not match
|
||||
log.vdebug("Actual file size on disk: ", localFileSize);
|
||||
log.vdebug("OneDrive API reported size: ", onlineFileSize);
|
||||
log.error("ERROR: File download size mis-match. Increase logging verbosity to determine why.");
|
||||
log.error("ERROR: File download size mismatch. Increase logging verbosity to determine why.");
|
||||
}
|
||||
// hash error?
|
||||
if (OneDriveFileHash != quickXorHash) {
|
||||
// downloaded file hash does not match
|
||||
log.vdebug("Actual local file hash: ", quickXorHash);
|
||||
log.vdebug("OneDrive API reported hash: ", OneDriveFileHash);
|
||||
log.error("ERROR: File download hash mis-match. Increase logging verbosity to determine why.");
|
||||
log.error("ERROR: File download hash mismatch. Increase logging verbosity to determine why.");
|
||||
}
|
||||
// add some workaround messaging
|
||||
if (accountType == "documentLibrary"){
|
||||
|
@ -3346,7 +3346,7 @@ final class SyncEngine
|
|||
logPath = path;
|
||||
}
|
||||
|
||||
// If we are using --upload-only & --sync-shared-folders there is a possability that a 'new' local folder might
|
||||
// If we are using --upload-only & --sync-shared-folders there is a possibility that a 'new' local folder might
|
||||
// be misinterpreted that it needs to be uploaded to the users default OneDrive DriveID rather than the requested / configured
|
||||
// Shared Business Folder. In --resync scenarios, the DB information that tells that this Business Shared Folder does not exist,
|
||||
// and in a --upload-only scenario will never exist, so the correct lookups are unable to be performed.
|
||||
|
@ -3429,7 +3429,7 @@ final class SyncEngine
|
|||
logPath = path;
|
||||
}
|
||||
|
||||
// If we are using --upload-only & --sync-shared-folders there is a possability that a 'new' local folder might
|
||||
// If we are using --upload-only & --sync-shared-folders there is a possibility that a 'new' local folder might
|
||||
// be misinterpreted that it needs to be uploaded to the users default OneDrive DriveID rather than the requested / configured
|
||||
// Shared Business Folder. In --resync scenarios, the DB information that tells that this Business Shared Folder does not exist,
|
||||
// and in a --upload-only scenario will never exist, so the correct lookups are unable to be performed.
|
||||
|
@ -4468,7 +4468,7 @@ final class SyncEngine
|
|||
}
|
||||
|
||||
// If we are in a --dry-run scenario, we may have renamed a folder - but it is technically not renamed locally
|
||||
// Thus, that entire path may be attemtped to be uploaded as new data to OneDrive
|
||||
// Thus, that entire path may be attempted to be uploaded as new data to OneDrive
|
||||
if (dryRun) {
|
||||
// check the pathsRenamed array for this path
|
||||
// if any match - we need to exclude this path
|
||||
|
@ -4722,7 +4722,7 @@ final class SyncEngine
|
|||
|
||||
// Is the parent a 'folder' from another user? ie - is this a 'shared folder' that has been shared with us?
|
||||
if (defaultDriveId == parent.driveId){
|
||||
// enforce check of parent path. if the above was triggered, the below will generate a sync retry and will now be sucessful
|
||||
// enforce check of parent path. if the above was triggered, the below will generate a sync retry and will now be successful
|
||||
enforce(itemdb.selectByPath(dirName(path), parent.driveId, parent), "The parent item id is not in the database");
|
||||
} else {
|
||||
log.vdebug("Parent drive ID is not our drive ID - parent most likely a shared folder");
|
||||
|
@ -6859,7 +6859,7 @@ final class SyncEngine
|
|||
onedrive.resetRetryAfterValue();
|
||||
}
|
||||
|
||||
// Generage a /delta compatible response when using National Azure AD deployments that do not support /delta queries
|
||||
// Generate a /delta compatible response when using National Azure AD deployments that do not support /delta queries
|
||||
// see: https://docs.microsoft.com/en-us/graph/deployments#supported-features
|
||||
JSONValue generateDeltaResponse(const(char)[] driveId, const(char)[] idToQuery)
|
||||
{
|
||||
|
@ -7057,7 +7057,7 @@ final class SyncEngine
|
|||
// The full parent path of the child, as per the JSON might be:
|
||||
// /Level 1/Level 2/Level 3/Child Shared Folder/some folder/another folder
|
||||
// But 'Child Shared Folder' is what is shared, thus '/Level 1/Level 2/Level 3/' is a potential information leak if logged.
|
||||
// Plus, the application output now shows accuratly what is being shared - so that is a good thing.
|
||||
// Plus, the application output now shows accurately what is being shared - so that is a good thing.
|
||||
log.vlog("Adding ", count(thisLevelChildren["value"].array), " OneDrive items for processing from ", pathForLogging);
|
||||
}
|
||||
foreach (child; thisLevelChildren["value"].array) {
|
||||
|
@ -7282,7 +7282,7 @@ final class SyncEngine
|
|||
if ((newDatabaseItem.quickXorHash.empty) && (newDatabaseItem.sha256Hash.empty)) {
|
||||
// Odd .. no hash ......
|
||||
string apiMessage = "WARNING: OneDrive API inconsistency - this file does not have any hash: ";
|
||||
// This is computationally expensive .. but we are only doing this if there are no hashses provided:
|
||||
// This is computationally expensive .. but we are only doing this if there are no hashes provided:
|
||||
bool parentInDatabase = itemdb.idInLocalDatabase(newDatabaseItem.driveId, newDatabaseItem.parentId);
|
||||
if (parentInDatabase) {
|
||||
// Calculate this item path
|
||||
|
|
Loading…
Reference in a new issue