Compare commits

...
Sign in to create a new pull request.

24 commits

Author SHA1 Message Date
Nick Craig-Wood
825dd65e1d Version v1.55.1 2021-04-26 08:32:21 +01:00
OleFrost
96cdbc5eaa onedrive: Work around for random "Unable to initialize RPS" errors
OneDrive randomly returns the error message: "InvalidAuthenticationToken: Unable to initialize RPS". These unexpected errors typically caused the entire rclone command to fail.

This work around recognizes these errors and marks them for a low level retry, that mostly succeeds. This will make rclone commands complete without being noticeable affected.

Fixes: #5270
2021-04-25 17:07:07 +01:00
buengese
baf626c1d0 compress: fix compressed name regexp 2021-04-25 17:06:49 +01:00
Nick Craig-Wood
e8be37bebc build: fix version numbers in android branch builds 2021-04-25 17:06:36 +01:00
Nick Craig-Wood
e67ac64f51 dropbox: fix Unable to decrypt returned paths from changeNotify - fixes #5165
This was caused by incorrect use of strings.TrimLeft where
strings.TrimPrefix was required.
2021-04-21 10:53:59 +01:00
Nick Craig-Wood
c86fc6e05d vfs: fix a code path which allows dirty data to be removed causing data loss
Before this change the VFS layer could remove a locally cached file
even if it had data which needed to be written back, thus causing data loss.

See: https://forum.rclone.org/t/rclone-1-55-doesnt-save-file-changes-if-the-file-has-been-reopened-during-upload-google-drive-mount/23646
2021-04-20 16:43:07 +01:00
Ansh Mittal
a6cab5d0e9 drive: don't open browser when service account...
credentials specified 

Fixes #5104
2021-04-20 16:40:02 +01:00
Nick Craig-Wood
0d8c69b4ea dropbox: add missing team_data.member scope for use with --impersonate
See: https://forum.rclone.org/t/dropbox-business-not-accepting-oauth2/23390/32
2021-04-17 17:40:39 +01:00
Nick Craig-Wood
07f4b9832d dropbox: fix About after scopes changes - rclone config reconnect needed
This adds the missing scope for the About call. To use it it will be
necessary to refresh the token with `rclone config reconnect`.

See: https://forum.rclone.org/t/dropbox-too-many-requests-or-write-operations-trying-again-in-15-seconds/23316/33
2021-04-16 15:07:43 +01:00
Ivan Andreev
c764ab2751 backend/ftp: fix implicit TLS after PR #4266 (#5219)
PR #4266 modified ftpConnection to make ftp library into using
a custom dial function which is QoS aware and takes care of TLS.
However the ServerConn.Login function from the ftp library also needs
TLS config passed explicitly as a trigger for sending PSBZ and PROT
options to FTP server. This was not taken care of resulting in
failure to connect via FTP with implicit TLS.
This PR fixes that.

Fixes #5210
2021-04-10 11:49:44 +01:00
Nick Craig-Wood
563c4f76c6 sync: fix incorrect error reported by graceful cutoff - fixes #5203
Before this change, a sync which was finished with a graceful transfer
cutoff could return "context canceled" instead of the correct error.

This fixes the problem by ignoring "context canceled" errors if we
have done a graceful stop.
2021-04-10 11:49:44 +01:00
albertony
2f6afe6005 docs: fixed some typos 2021-04-10 11:45:59 +01:00
buengese
b30d7a026f zoho: do not ask for mountpoint twice when using headless setup 2021-04-10 11:45:59 +01:00
albertony
1a5e67fe98 docs: minor cleanup of space around code section 2021-04-10 11:45:59 +01:00
albertony
2d210c2729 docs: WinFsp 2021 is out of beta 2021-04-10 11:45:59 +01:00
Nick Craig-Wood
5603983a5d drive: fix backend copyid of google doc to directory - fixes #5196
Before this change the google doc was being copied to the directory
without an extension.
2021-04-06 11:48:17 +01:00
Nick Craig-Wood
501475a3a3 sftp: fix Update ReadFrom failed: failed to send packet: EOF errors
In

a3fcadddc8 sftp: close idle connections after --sftp-idle-timeout (1m by default)

Idle SFTP connections were closed after 1 minute. However due to the
way SSH multiplexes connections over a single SSH connection this
meant that if uploads or downloads went on for more than one minute
they failed with "EOF errors" as their underlying connection was
closed.

This fixes the problem by not clearing idle connections if there are
any transfers in progress.

Fixes #5197
2021-04-06 10:05:54 +01:00
Nick Craig-Wood
958f5297fe sftp: revert sftp library to v1.12.0 from v1.13.0 to fix performance regression #5197
This reverts the library update done in this commit.

713f8f357d sftp: fix "file not found" errors for read once servers

Reverting this commit triples the performance to a far away sftp server.

See: https://github.com/pkg/sftp/issues/426
2021-04-06 10:05:54 +01:00
buengese
572c6ad601 zoho: fix error when region isn't set 2021-04-06 10:05:54 +01:00
Ivan Andreev
9e2e2bb5fc build: add build tag noselfupdate
Allow downstream packaging to build rclone without selfupdate command:
$ go build -tags noselfupdate

Fixes #5187
2021-04-06 10:05:54 +01:00
Nick Gaya
12d039261f contributing.md: update setup instructions for go1.16 2021-04-06 10:05:54 +01:00
Ivan Andreev
74be50ae92 selfupdate: dont detect FUSE if build is static
Before this patch selfupdate detected ANY build with cmount tag as a build
having libFUSE capabilities. However, only dynamic builds really have it.
The official linux builds are static and have the cmount tag as of the time
of this writing. This results in inability to update official linux binaries.
This patch fixes that. The build can be fixed independently.
2021-04-06 10:05:54 +01:00
Nick Craig-Wood
b0608d6f25 install.sh: fix macOS arm64 download - fixes #5183 2021-03-31 21:49:12 +01:00
Nick Craig-Wood
b60838221b Start v1.55.1-DEV development 2021-03-31 21:49:02 +01:00
45 changed files with 498 additions and 124 deletions

View file

@ -221,6 +221,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Upgrade together with NDK version
- name: Set up Go 1.14

View file

@ -33,10 +33,11 @@ page](https://github.com/rclone/rclone).
Now in your terminal
go get -u github.com/rclone/rclone
cd $GOPATH/src/github.com/rclone/rclone
git clone https://github.com/rclone/rclone.git
cd rclone
git remote rename origin upstream
git remote add origin git@github.com:YOURUSER/rclone.git
go build
Make a branch to add your new feature

79
MANUAL.html generated
View file

@ -17,7 +17,7 @@
<header id="title-block-header">
<h1 class="title">rclone(1) User Manual</h1>
<p class="author">Nick Craig-Wood</p>
<p class="date">Mar 31, 2021</p>
<p class="date">Apr 26, 2021</p>
</header>
<h1 id="rclone-syncs-your-files-to-cloud-storage">Rclone syncs your files to cloud storage</h1>
<p><img width="50%" src="https://rclone.org/img/logo_on_light__horizontal_color.svg" alt="rclone logo" style="float:right; padding: 5px;" ></p>
@ -774,8 +774,8 @@ two-3.txt: renamed from: two.txt</code></pre>
<h1 id="rclone-about">rclone about</h1>
<p>Get quota information from the remote.</p>
<h2 id="synopsis-16">Synopsis</h2>
<p><code>rclone about</code>prints quota information about a remote to standard output. The output is typically used, free, quota and trash contents.</p>
<p>E.g. Typical output from<code>rclone about remote:</code>is:</p>
<p><code>rclone about</code> prints quota information about a remote to standard output. The output is typically used, free, quota and trash contents.</p>
<p>E.g. Typical output from <code>rclone about remote:</code> is:</p>
<pre><code>Total: 17G
Used: 7.444G
Free: 1.315G
@ -797,7 +797,7 @@ Used: 7993453766
Free: 1411001220
Trashed: 104857602
Other: 8849156022</code></pre>
<p>A <code>--json</code>flag generates conveniently computer readable output, e.g.</p>
<p>A <code>--json</code> flag generates conveniently computer readable output, e.g.</p>
<pre><code>{
&quot;total&quot;: 18253611008,
&quot;used&quot;: 7993453766,
@ -1066,7 +1066,7 @@ if src is directory
<p>Copy url content to dest.</p>
<h2 id="synopsis-28">Synopsis</h2>
<p>Download a URL's content and copy it to the destination without saving it in temporary storage.</p>
<p>Setting <code>--auto-filename</code>will cause the file name to be retrieved from the from URL (after any redirections) and used in the destination path. With <code>--print-filename</code> in addition, the resuling file name will be printed.</p>
<p>Setting <code>--auto-filename</code> will cause the file name to be retrieved from the from URL (after any redirections) and used in the destination path. With <code>--print-filename</code> in addition, the resuling file name will be printed.</p>
<p>Setting <code>--no-clobber</code> will prevent overwriting file on the destination if there is one with the same name.</p>
<p>Setting <code>--stdout</code> or making the output file name <code>-</code> will cause the output to be written to standard output.</p>
<pre><code>rclone copyurl https://example.com dest:path [flags]</code></pre>
@ -1475,7 +1475,7 @@ rclone mount remote:path/to/files * --volname \\cloud\remote</code></pre>
<p>The permissions on each entry will be set according to <a href="#options">options</a> <code>--dir-perms</code> and <code>--file-perms</code>, which takes a value in traditional <a href="https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation">numeric notation</a>, where the default corresponds to <code>--file-perms 0666 --dir-perms 0777</code>.</p>
<p>Note that the mapping of permissions is not always trivial, and the result you see in Windows Explorer may not be exactly like you expected. For example, when setting a value that includes write access, this will be mapped to individual permissions "write attributes", "write data" and "append data", but not "write extended attributes". Windows will then show this as basic permission "Special" instead of "Write", because "Write" includes the "write extended attributes" permission.</p>
<p>If you set POSIX permissions for only allowing access to the owner, using <code>--file-perms 0600 --dir-perms 0700</code>, the user group and the built-in "Everyone" group will still be given some special permissions, such as "read attributes" and "read permissions", in Windows. This is done for compatibility reasons, e.g. to allow users without additional permissions to be able to read basic metadata about files like in UNIX. One case that may arise is that other programs (incorrectly) interprets this as the file being accessible by everyone. For example an SSH client may warn about "unprotected private key file".</p>
<p>WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option "FileSecurity", that allows the complete specification of file security descriptors using <a href="https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format">SDDL</a>. With this you can work around issues such as the mentioned "unprotected private key file" by specifying <code>-o FileSecurity="D:P(A;;FA;;;OW)"</code>, for file all access (FA) to the owner (OW).</p>
<p>WinFsp 2021 (version 1.9) introduces a new FUSE option "FileSecurity", that allows the complete specification of file security descriptors using <a href="https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format">SDDL</a>. With this you can work around issues such as the mentioned "unprotected private key file" by specifying <code>-o FileSecurity="D:P(A;;FA;;;OW)"</code>, for file all access (FA) to the owner (OW).</p>
<h3 id="windows-caveats">Windows caveats</h3>
<p>Note that drives created as Administrator are not visible by other accounts (including the account that was elevated as Administrator). So if you start a Windows drive from an Administrative Command Prompt and then try to access the same drive from Explorer (which does not run as Administrator), you will not be able to see the new drive.</p>
<p>The easiest way around this is to start the drive from a normal command prompt. It is also possible to start a drive from the SYSTEM account (using <a href="https://github.com/billziss-gh/winfsp/wiki/WinFsp-Service-Architecture">the WinFsp.Launcher infrastructure</a>) which creates drives accessible for everyone on the system or alternatively using <a href="https://nssm.cc/usage">the nssm service manager</a>.</p>
@ -1805,7 +1805,7 @@ ffmpeg - | rclone rcat remote:path/to/file</code></pre>
<p>This command downloads the latest release of rclone and replaces the currently running binary. The download is verified with a hashsum and cryptographically signed signature.</p>
<p>If used without flags (or with implied <code>--stable</code> flag), this command will install the latest stable release. However, some issues may be fixed (or features added) only in the latest beta release. In such cases you should run the command with the <code>--beta</code> flag, i.e. <code>rclone selfupdate --beta</code>. You can check in advance what version would be installed by adding the <code>--check</code> flag, then repeat the command without it when you are satisfied.</p>
<p>Sometimes the rclone team may recommend you a concrete beta or stable rclone release to troubleshoot your issue or add a bleeding edge feature. The <code>--version VER</code> flag, if given, will update to the concrete version instead of the latest one. If you omit micro version from <code>VER</code> (for example <code>1.53</code>), the latest matching micro version will be used.</p>
<p>Upon successful update rclone will print a message that contains a previous version number. You will need it if you later decide to revert your update for some reason. Then you'll have to note the previous version and run the following command: <code>rclone selfupdate [--beta] OLDVER</code>. If the old version contains only dots and digits (for example <code>v1.54.0</code>) then it's a stable release so you won't need the <code>--beta</code> flag. Beta releases have an additional information similar to <code>v1.54.0-beta.5111.06f1c0c61</code>. (if you are a developer and use a locally built rclone, the version number will end with <code>-DEV</code>, you will have to rebuild it as it obvisously can't be distributed).</p>
<p>Upon successful update rclone will print a message that contains a previous version number. You will need it if you later decide to revert your update for some reason. Then you'll have to note the previous version and run the following command: <code>rclone selfupdate [--beta] OLDVER</code>. If the old version contains only dots and digits (for example <code>v1.54.0</code>) then it's a stable release so you won't need the <code>--beta</code> flag. Beta releases have an additional information similar to <code>v1.54.0-beta.5111.06f1c0c61</code>. (if you are a developer and use a locally built rclone, the version number will end with <code>-DEV</code>, you will have to rebuild it as it obviously can't be distributed).</p>
<p>If you previously installed rclone via a package manager, the package may include local documentation or configure services. You may wish to update with the flag <code>--package deb</code> or <code>--package rpm</code> (whichever is correct for your OS) to update these too. This command with the default <code>--package zip</code> will update only the rclone executable so the local manual may become inaccurate after it.</p>
<p>The <code>rclone mount</code> command (https://rclone.org/commands/rclone_mount/) may or may not support extended FUSE options depending on the build and OS. <code>selfupdate</code> will refuse to update if the capability would be discarded.</p>
<p>Note: Windows forbids deletion of a currently running executable so this command will rename the old executable to 'rclone.old.exe' upon success.</p>
@ -3378,7 +3378,7 @@ rclone sync -i /path/to/files remote:current-backup</code></pre>
<p>Normally the config file is in your home directory as a file called <code>.config/rclone/rclone.conf</code> (or <code>.rclone.conf</code> if created with an older version). If <code>$XDG_CONFIG_HOME</code> is set it will be at <code>$XDG_CONFIG_HOME/rclone/rclone.conf</code>.</p>
<p>If there is a file <code>rclone.conf</code> in the same directory as the rclone executable it will be preferred. This file must be created manually for Rclone to use it, it will never be created automatically.</p>
<p>If you run <code>rclone config file</code> you will see where the default location is for you.</p>
<p>Use this flag to override the config location, e.g. <code>rclone --config=".myconfig" .config</code>.</p>
<p>Use this flag to override the config location, e.g. <code>rclone --config=".myconfig" config</code>.</p>
<p>If the location is set to empty string <code>""</code> or the special value <code>/notfound</code>, or the os null device represented by value <code>NUL</code> on Windows and <code>/dev/null</code> on Unix systems, then rclone will keep the config file in memory only.</p>
<p>The file format is basic <a href="https://en.wikipedia.org/wiki/INI_file#Format">INI</a>: Sections of text, led by a <code>[section]</code> header and followed by <code>key=value</code> entries on separate lines. In rclone each remote is represented by its own section, where the section name defines the name of the remote. Options are specified as the <code>key=value</code> entries, where the key is the option name without the <code>--backend-</code> prefix, in lowercase and with <code>_</code> instead of <code>-</code>. E.g. option <code>--mega-hard-delete</code> corresponds to key <code>hard_delete</code>. Only backend options can be specified. A special, and required, key <code>type</code> identifies the <a href="https://rclone.org/overview/">storage system</a>, where the value is the internal lowercase name as returned by command <code>rclone help backends</code>. Comments are indicated by <code>;</code> or <code>#</code> at the beginning of a line.</p>
<p>Example:</p>
@ -3929,7 +3929,7 @@ $ rclone lsd MYS3:
$ rclone listremotes | grep mys3
mys3:</code></pre>
<p>Note that if you want to create a remote using environment variables you must create the <code>..._TYPE</code> variable as above.</p>
<p>Note also that now rclone has <a href="#connection-strings">connectionstrings</a>, it is probably easier to use those instead which makes the above example</p>
<p>Note also that now rclone has <a href="#connection-strings">connection strings</a>, it is probably easier to use those instead which makes the above example</p>
<pre><code>rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:</code></pre>
<h3 id="precedence">Precedence</h3>
<p>The various different methods of backend configuration are read in this order and the first one with a value is used.</p>
@ -6806,7 +6806,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--use-json-log Use json log format.
--use-mmap Use mmap allocator (see docs).
--use-server-modtime Use server modified time instead of object metadata
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default &quot;rclone/v1.55.0&quot;)
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default &quot;rclone/v1.55.1&quot;)
-v, --verbose count Print lots more stuff (repeat for more)</code></pre>
<h2 id="backend-flags">Backend Flags</h2>
<p>These flags are available for every command. They control the backends and may be set in the config file.</p>
@ -20355,6 +20355,65 @@ $ tree /tmp/b
<li>"error": return an error based on option value</li>
</ul>
<h1 id="changelog">Changelog</h1>
<h2 id="v1.55.1---2021-04-26">v1.55.1 - 2021-04-26</h2>
<p><a href="https://github.com/rclone/rclone/compare/v1.55.0...v1.55.1">See commits</a></p>
<ul>
<li>Bug Fixes
<ul>
<li>selfupdate
<ul>
<li>Dont detect FUSE if build is static (Ivan Andreev)</li>
<li>Add build tag noselfupdate (Ivan Andreev)</li>
</ul></li>
<li>sync: Fix incorrect error reported by graceful cutoff (Nick Craig-Wood)</li>
<li>install.sh: fix macOS arm64 download (Nick Craig-Wood)</li>
<li>build: Fix version numbers in android branch builds (Nick Craig-Wood)</li>
<li>docs
<ul>
<li>Contributing.md: update setup instructions for go1.16 (Nick Gaya)</li>
<li>WinFsp 2021 is out of beta (albertony)</li>
<li>Minor cleanup of space around code section (albertony)</li>
<li>Fixed some typos (albertony)</li>
</ul></li>
</ul></li>
<li>VFS
<ul>
<li>Fix a code path which allows dirty data to be removed causing data loss (Nick Craig-Wood)</li>
</ul></li>
<li>Compress
<ul>
<li>Fix compressed name regexp (buengese)</li>
</ul></li>
<li>Drive
<ul>
<li>Fix backend copyid of google doc to directory (Nick Craig-Wood)</li>
<li>Don't open browser when service account... (Ansh Mittal)</li>
</ul></li>
<li>Dropbox
<ul>
<li>Add missing team_data.member scope for use with --impersonate (Nick Craig-Wood)</li>
<li>Fix About after scopes changes - rclone config reconnect needed (Nick Craig-Wood)</li>
<li>Fix Unable to decrypt returned paths from changeNotify (Nick Craig-Wood)</li>
</ul></li>
<li>FTP
<ul>
<li>Fix implicit TLS (Ivan Andreev)</li>
</ul></li>
<li>Onedrive
<ul>
<li>Work around for random "Unable to initialize RPS" errors (OleFrost)</li>
</ul></li>
<li>SFTP
<ul>
<li>Revert sftp library to v1.12.0 from v1.13.0 to fix performance regression (Nick Craig-Wood)</li>
<li>Fix Update ReadFrom failed: failed to send packet: EOF errors (Nick Craig-Wood)</li>
</ul></li>
<li>Zoho
<ul>
<li>Fix error when region isn't set (buengese)</li>
<li>Do not ask for mountpoint twice when using headless setup (buengese)</li>
</ul></li>
</ul>
<h2 id="v1.55.0---2021-03-31">v1.55.0 - 2021-03-31</h2>
<p><a href="https://github.com/rclone/rclone/compare/v1.54.0...v1.55.0">See commits</a></p>
<ul>

58
MANUAL.md generated
View file

@ -1,6 +1,6 @@
% rclone(1) User Manual
% Nick Craig-Wood
% Mar 31, 2021
% Apr 26, 2021
# Rclone syncs your files to cloud storage
@ -1395,10 +1395,10 @@ Get quota information from the remote.
## Synopsis
`rclone about`prints quota information about a remote to standard
`rclone about` prints quota information about a remote to standard
output. The output is typically used, free, quota and trash contents.
E.g. Typical output from`rclone about remote:`is:
E.g. Typical output from `rclone about remote:` is:
Total: 17G
Used: 7.444G
@ -1426,7 +1426,7 @@ Applying a `--full` flag to the command prints the bytes in full, e.g.
Trashed: 104857602
Other: 8849156022
A `--json`flag generates conveniently computer readable output, e.g.
A `--json` flag generates conveniently computer readable output, e.g.
{
"total": 18253611008,
@ -2009,7 +2009,7 @@ Copy url content to dest.
Download a URL's content and copy it to the destination without saving
it in temporary storage.
Setting `--auto-filename`will cause the file name to be retrieved from
Setting `--auto-filename` will cause the file name to be retrieved from
the from URL (after any redirections) and used in the destination
path. With `--print-filename` in addition, the resuling file name will
be printed.
@ -2931,7 +2931,7 @@ metadata about files like in UNIX. One case that may arise is that other program
(incorrectly) interprets this as the file being accessible by everyone. For example
an SSH client may warn about "unprotected private key file".
WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option "FileSecurity",
WinFsp 2021 (version 1.9) introduces a new FUSE option "FileSecurity",
that allows the complete specification of file security descriptors using
[SDDL](https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
With this you can work around issues such as the mentioned "unprotected private key file"
@ -3751,7 +3751,7 @@ If the old version contains only dots and digits (for example `v1.54.0`)
then it's a stable release so you won't need the `--beta` flag. Beta releases
have an additional information similar to `v1.54.0-beta.5111.06f1c0c61`.
(if you are a developer and use a locally built rclone, the version number
will end with `-DEV`, you will have to rebuild it as it obvisously can't
will end with `-DEV`, you will have to rebuild it as it obviously can't
be distributed).
If you previously installed rclone via a package manager, the package may
@ -6977,7 +6977,7 @@ If you run `rclone config file` you will see where the default
location is for you.
Use this flag to override the config location, e.g. `rclone
--config=".myconfig" .config`.
--config=".myconfig" config`.
If the location is set to empty string `""` or the special value
`/notfound`, or the os null device represented by value `NUL` on
@ -8442,7 +8442,7 @@ mys3:
Note that if you want to create a remote using environment variables
you must create the `..._TYPE` variable as above.
Note also that now rclone has [connectionstrings](#connection-strings),
Note also that now rclone has [connection strings](#connection-strings),
it is probably easier to use those instead which makes the above example
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
@ -11750,7 +11750,7 @@ These flags are available for every command.
--use-json-log Use json log format.
--use-mmap Use mmap allocator (see docs).
--use-server-modtime Use server modified time instead of object metadata
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.0")
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.1")
-v, --verbose count Print lots more stuff (repeat for more)
```
@ -28837,6 +28837,44 @@ Options:
# Changelog
## v1.55.1 - 2021-04-26
[See commits](https://github.com/rclone/rclone/compare/v1.55.0...v1.55.1)
* Bug Fixes
* selfupdate
* Dont detect FUSE if build is static (Ivan Andreev)
* Add build tag noselfupdate (Ivan Andreev)
* sync: Fix incorrect error reported by graceful cutoff (Nick Craig-Wood)
* install.sh: fix macOS arm64 download (Nick Craig-Wood)
* build: Fix version numbers in android branch builds (Nick Craig-Wood)
* docs
* Contributing.md: update setup instructions for go1.16 (Nick Gaya)
* WinFsp 2021 is out of beta (albertony)
* Minor cleanup of space around code section (albertony)
* Fixed some typos (albertony)
* VFS
* Fix a code path which allows dirty data to be removed causing data loss (Nick Craig-Wood)
* Compress
* Fix compressed name regexp (buengese)
* Drive
* Fix backend copyid of google doc to directory (Nick Craig-Wood)
* Don't open browser when service account... (Ansh Mittal)
* Dropbox
* Add missing team_data.member scope for use with --impersonate (Nick Craig-Wood)
* Fix About after scopes changes - rclone config reconnect needed (Nick Craig-Wood)
* Fix Unable to decrypt returned paths from changeNotify (Nick Craig-Wood)
* FTP
* Fix implicit TLS (Ivan Andreev)
* Onedrive
* Work around for random "Unable to initialize RPS" errors (OleFrost)
* SFTP
* Revert sftp library to v1.12.0 from v1.13.0 to fix performance regression (Nick Craig-Wood)
* Fix Update ReadFrom failed: failed to send packet: EOF errors (Nick Craig-Wood)
* Zoho
* Fix error when region isn't set (buengese)
* Do not ask for mountpoint twice when using headless setup (buengese)
## v1.55.0 - 2021-03-31
[See commits](https://github.com/rclone/rclone/compare/v1.54.0...v1.55.0)

81
MANUAL.txt generated
View file

@ -1,6 +1,6 @@
rclone(1) User Manual
Nick Craig-Wood
Mar 31, 2021
Apr 26, 2021
@ -1419,10 +1419,10 @@ Get quota information from the remote.
Synopsis
rclone aboutprints quota information about a remote to standard output.
rclone about prints quota information about a remote to standard output.
The output is typically used, free, quota and trash contents.
E.g. Typical output fromrclone about remote:is:
E.g. Typical output from rclone about remote: is:
Total: 17G
Used: 7.444G
@ -1450,7 +1450,7 @@ Applying a --full flag to the command prints the bytes in full, e.g.
Trashed: 104857602
Other: 8849156022
A --jsonflag generates conveniently computer readable output, e.g.
A --json flag generates conveniently computer readable output, e.g.
{
"total": 18253611008,
@ -2036,9 +2036,10 @@ Synopsis
Download a URL's content and copy it to the destination without saving
it in temporary storage.
Setting --auto-filenamewill cause the file name to be retrieved from the
from URL (after any redirections) and used in the destination path. With
--print-filename in addition, the resuling file name will be printed.
Setting --auto-filename will cause the file name to be retrieved from
the from URL (after any redirections) and used in the destination path.
With --print-filename in addition, the resuling file name will be
printed.
Setting --no-clobber will prevent overwriting file on the destination if
there is one with the same name.
@ -2968,10 +2969,10 @@ One case that may arise is that other programs (incorrectly) interprets
this as the file being accessible by everyone. For example an SSH client
may warn about "unprotected private key file".
WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option
"FileSecurity", that allows the complete specification of file security
descriptors using SDDL. With this you can work around issues such as the
mentioned "unprotected private key file" by specifying
WinFsp 2021 (version 1.9) introduces a new FUSE option "FileSecurity",
that allows the complete specification of file security descriptors
using SDDL. With this you can work around issues such as the mentioned
"unprotected private key file" by specifying
-o FileSecurity="D:P(A;;FA;;;OW)", for file all access (FA) to the owner
(OW).
@ -3797,7 +3798,7 @@ and digits (for example v1.54.0) then it's a stable release so you won't
need the --beta flag. Beta releases have an additional information
similar to v1.54.0-beta.5111.06f1c0c61. (if you are a developer and use
a locally built rclone, the version number will end with -DEV, you will
have to rebuild it as it obvisously can't be distributed).
have to rebuild it as it obviously can't be distributed).
If you previously installed rclone via a package manager, the package
may include local documentation or configure services. You may wish to
@ -7123,7 +7124,7 @@ If you run rclone config file you will see where the default location is
for you.
Use this flag to override the config location, e.g.
rclone --config=".myconfig" .config.
rclone --config=".myconfig" config.
If the location is set to empty string "" or the special value
/notfound, or the os null device represented by value NUL on Windows and
@ -8566,7 +8567,7 @@ For example, to configure an S3 remote named mys3: without a config file
Note that if you want to create a remote using environment variables you
must create the ..._TYPE variable as above.
Note also that now rclone has connectionstrings, it is probably easier
Note also that now rclone has connection strings, it is probably easier
to use those instead which makes the above example
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
@ -11862,7 +11863,7 @@ These flags are available for every command.
--use-json-log Use json log format.
--use-mmap Use mmap allocator (see docs).
--use-server-modtime Use server modified time instead of object metadata
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.0")
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.1")
-v, --verbose count Print lots more stuff (repeat for more)
@ -28814,6 +28815,56 @@ Options:
CHANGELOG
v1.55.1 - 2021-04-26
See commits
- Bug Fixes
- selfupdate
- Dont detect FUSE if build is static (Ivan Andreev)
- Add build tag noselfupdate (Ivan Andreev)
- sync: Fix incorrect error reported by graceful cutoff (Nick
Craig-Wood)
- install.sh: fix macOS arm64 download (Nick Craig-Wood)
- build: Fix version numbers in android branch builds (Nick
Craig-Wood)
- docs
- Contributing.md: update setup instructions for go1.16 (Nick
Gaya)
- WinFsp 2021 is out of beta (albertony)
- Minor cleanup of space around code section (albertony)
- Fixed some typos (albertony)
- VFS
- Fix a code path which allows dirty data to be removed causing
data loss (Nick Craig-Wood)
- Compress
- Fix compressed name regexp (buengese)
- Drive
- Fix backend copyid of google doc to directory (Nick Craig-Wood)
- Don't open browser when service account... (Ansh Mittal)
- Dropbox
- Add missing team_data.member scope for use with --impersonate
(Nick Craig-Wood)
- Fix About after scopes changes - rclone config reconnect needed
(Nick Craig-Wood)
- Fix Unable to decrypt returned paths from changeNotify (Nick
Craig-Wood)
- FTP
- Fix implicit TLS (Ivan Andreev)
- Onedrive
- Work around for random "Unable to initialize RPS" errors
(OleFrost)
- SFTP
- Revert sftp library to v1.12.0 from v1.13.0 to fix performance
regression (Nick Craig-Wood)
- Fix Update ReadFrom failed: failed to send packet: EOF errors
(Nick Craig-Wood)
- Zoho
- Fix error when region isn't set (buengese)
- Do not ask for mountpoint twice when using headless setup
(buengese)
v1.55.0 - 2021-03-31
See commits

View file

@ -1 +1 @@
v1.55.0
v1.55.1

View file

@ -53,7 +53,7 @@ const (
Gzip = 2
)
var nameRegexp = regexp.MustCompile("^(.+?)\\.([A-Za-z0-9+_]{11})$")
var nameRegexp = regexp.MustCompile("^(.+?)\\.([A-Za-z0-9-_]{11})$")
// Register with Fs
func init() {

View file

@ -199,7 +199,7 @@ func init() {
m.Set("root_folder_id", "appDataFolder")
}
if opt.ServiceAccountFile == "" {
if opt.ServiceAccountFile == "" && opt.ServiceAccountCredentials == "" {
err = oauthutil.Config(ctx, "drive", name, m, driveConfig, nil)
if err != nil {
log.Fatalf("Failed to configure token: %v", err)
@ -3069,7 +3069,7 @@ func (f *Fs) copyID(ctx context.Context, id, dest string) (err error) {
return err
}
if destLeaf == "" {
destLeaf = info.Name
destLeaf = path.Base(o.Remote())
}
if destDir == "" {
destDir = "."

View file

@ -99,8 +99,10 @@ var (
"files.content.write",
"files.content.read",
"sharing.write",
"account_info.read", // needed for About
// "file_requests.write",
// "members.read", // needed for impersonate - but causes app to need to be approved by Dropbox Team Admin during the flow
// "team_data.member"
},
// Endpoint: oauth2.Endpoint{
// AuthURL: "https://www.dropbox.com/1/oauth2/authorize",
@ -130,8 +132,8 @@ func getOauthConfig(m configmap.Mapper) *oauth2.Config {
}
// Make a copy of the config
config := *dropboxConfig
// Make a copy of the scopes with "members.read" appended
config.Scopes = append(config.Scopes, "members.read")
// Make a copy of the scopes with extra scopes requires appended
config.Scopes = append(config.Scopes, "members.read", "team_data.member")
return &config
}
@ -1334,13 +1336,13 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
switch info := entry.(type) {
case *files.FolderMetadata:
entryType = fs.EntryDirectory
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
case *files.FileMetadata:
entryType = fs.EntryObject
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
case *files.DeletedMetadata:
entryType = fs.EntryObject
entryPath = strings.TrimLeft(info.PathDisplay, f.slashRootSlash)
entryPath = strings.TrimPrefix(info.PathDisplay, f.slashRootSlash)
default:
fs.Errorf(entry, "dropbox ChangeNotify: ignoring unknown EntryType %T", entry)
continue

View file

@ -241,23 +241,6 @@ func (dl *debugLog) Write(p []byte) (n int, err error) {
return len(p), nil
}
type dialCtx struct {
f *Fs
ctx context.Context
}
// dial a new connection with fshttp dialer
func (d *dialCtx) dial(network, address string) (net.Conn, error) {
conn, err := fshttp.NewDialer(d.ctx).Dial(network, address)
if err != nil {
return nil, err
}
if d.f.tlsConf != nil {
conn = tls.Client(conn, d.f.tlsConf)
}
return conn, err
}
// shouldRetry returns a boolean as to whether this err deserve to be
// retried. It returns the err as a convenience
func shouldRetry(ctx context.Context, err error) (bool, error) {
@ -277,9 +260,22 @@ func shouldRetry(ctx context.Context, err error) (bool, error) {
// Open a new connection to the FTP server.
func (f *Fs) ftpConnection(ctx context.Context) (c *ftp.ServerConn, err error) {
fs.Debugf(f, "Connecting to FTP server")
dCtx := dialCtx{f, ctx}
ftpConfig := []ftp.DialOption{ftp.DialWithDialFunc(dCtx.dial)}
if f.opt.ExplicitTLS {
// Make ftp library dial with fshttp dialer optionally using TLS
dial := func(network, address string) (conn net.Conn, err error) {
conn, err = fshttp.NewDialer(ctx).Dial(network, address)
if f.tlsConf != nil && err == nil {
conn = tls.Client(conn, f.tlsConf)
}
return
}
ftpConfig := []ftp.DialOption{ftp.DialWithDialFunc(dial)}
if f.opt.TLS {
// Our dialer takes care of TLS but ftp library also needs tlsConf
// as a trigger for sending PSBZ and PROT options to server.
ftpConfig = append(ftpConfig, ftp.DialWithTLS(f.tlsConf))
} else if f.opt.ExplicitTLS {
ftpConfig = append(ftpConfig, ftp.DialWithExplicitTLS(f.tlsConf))
// Initial connection needs to be cleartext for explicit TLS
conn, err := fshttp.NewDialer(ctx).Dial("tcp", f.dialAddr)

View file

@ -560,6 +560,9 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
if len(resp.Header["Www-Authenticate"]) == 1 && strings.Index(resp.Header["Www-Authenticate"][0], "expired_token") >= 0 {
retry = true
fs.Debugf(nil, "Should retry: %v", err)
} else if err != nil && strings.Contains(err.Error(), "Unable to initialize RPS") {
retry = true
fs.Debugf(nil, "HTTP 401: Unable to initialize RPS. Trying again.")
}
case 429: // Too Many Requests.
// see https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online

View file

@ -16,6 +16,7 @@ import (
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/pkg/errors"
@ -286,6 +287,7 @@ type Fs struct {
drain *time.Timer // used to drain the pool when we stop using the connections
pacer *fs.Pacer // pacer for operations
savedpswd string
transfers int32 // count in use references
}
// Object is a remote SFTP file that has been stat'd (so it exists, but is not necessarily open for reading)
@ -348,6 +350,23 @@ func (c *conn) closed() error {
return nil
}
// Show that we are doing an upload or download
//
// Call removeTransfer() when done
func (f *Fs) addTransfer() {
atomic.AddInt32(&f.transfers, 1)
}
// Show the upload or download done
func (f *Fs) removeTransfer() {
atomic.AddInt32(&f.transfers, -1)
}
// getTransfers shows whether there are any transfers in progress
func (f *Fs) getTransfers() int32 {
return atomic.LoadInt32(&f.transfers)
}
// Open a new connection to the SFTP server.
func (f *Fs) sftpConnection(ctx context.Context) (c *conn, err error) {
// Rate limit rate of new connections
@ -395,8 +414,12 @@ func (f *Fs) newSftpClient(conn *ssh.Client, opts ...sftp.ClientOption) (*sftp.C
opts = opts[:len(opts):len(opts)] // make sure we don't overwrite the callers opts
opts = append(opts,
sftp.UseFstat(f.opt.UseFstat),
sftp.UseConcurrentReads(!f.opt.DisableConcurrentReads),
// FIXME disabled after library reversion
// sftp.UseConcurrentReads(!f.opt.DisableConcurrentReads),
)
if f.opt.DisableConcurrentReads { // FIXME
fs.Errorf(f, "Ignoring disable_concurrent_reads after library reversion - see #5197")
}
return sftp.NewClientPipe(pr, pw, opts...)
}
@ -474,6 +497,13 @@ func (f *Fs) putSftpConnection(pc **conn, err error) {
func (f *Fs) drainPool(ctx context.Context) (err error) {
f.poolMu.Lock()
defer f.poolMu.Unlock()
if transfers := f.getTransfers(); transfers != 0 {
fs.Debugf(f, "Not closing %d unused connections as %d transfers in progress", len(f.pool), transfers)
if f.opt.IdleTimeout > 0 {
f.drain.Reset(time.Duration(f.opt.IdleTimeout)) // nudge on the pool emptying timer
}
return nil
}
if f.opt.IdleTimeout > 0 {
f.drain.Stop()
}
@ -1380,18 +1410,22 @@ func (o *Object) Storable() bool {
// objectReader represents a file open for reading on the SFTP server
type objectReader struct {
f *Fs
sftpFile *sftp.File
pipeReader *io.PipeReader
done chan struct{}
}
func newObjectReader(sftpFile *sftp.File) *objectReader {
func (f *Fs) newObjectReader(sftpFile *sftp.File) *objectReader {
pipeReader, pipeWriter := io.Pipe()
file := &objectReader{
f: f,
sftpFile: sftpFile,
pipeReader: pipeReader,
done: make(chan struct{}),
}
// Show connection in use
f.addTransfer()
go func() {
// Use sftpFile.WriteTo to pump data so that it gets a
@ -1421,6 +1455,8 @@ func (file *objectReader) Close() (err error) {
_ = file.pipeReader.Close()
// Wait for the background process to finish
<-file.done
// Show connection no longer in use
file.f.removeTransfer()
return err
}
@ -1454,12 +1490,14 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
return nil, errors.Wrap(err, "Open Seek failed")
}
}
in = readers.NewLimitedReadCloser(newObjectReader(sftpFile), limit)
in = readers.NewLimitedReadCloser(o.fs.newObjectReader(sftpFile), limit)
return in, nil
}
// Update a remote sftp file using the data <in> and ModTime from <src>
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
o.fs.addTransfer() // Show transfer in progress
defer o.fs.removeTransfer()
// Clear the hash cache since we are about to update the object
o.md5sum = nil
o.sha1sum = nil

View file

@ -96,6 +96,11 @@ func init() {
log.Fatalf("Failed to configure token: %v", err)
}
}
if fs.GetConfig(ctx).AutoConfirm {
return
}
if err = setupRoot(ctx, name, m); err != nil {
log.Fatalf("Failed to configure root directory: %v", err)
}
@ -161,7 +166,7 @@ type Object struct {
func setupRegion(m configmap.Mapper) {
region, ok := m.Get("region")
if !ok {
if !ok || region == "" {
log.Fatalf("No region set\n")
}
rootURL = fmt.Sprintf("https://workdrive.zoho.%s/api/v1", region)

View file

@ -44,10 +44,10 @@ var commandDefinition = &cobra.Command{
Use: "about remote:",
Short: `Get quota information from the remote.`,
Long: `
` + "`rclone about`" + `prints quota information about a remote to standard
` + "`rclone about`" + ` prints quota information about a remote to standard
output. The output is typically used, free, quota and trash contents.
E.g. Typical output from` + "`rclone about remote:`" + `is:
E.g. Typical output from ` + "`rclone about remote:`" + ` is:
Total: 17G
Used: 7.444G
@ -75,7 +75,7 @@ Applying a ` + "`--full`" + ` flag to the command prints the bytes in full, e.g.
Trashed: 104857602
Other: 8849156022
A ` + "`--json`" + `flag generates conveniently computer readable output, e.g.
A ` + "`--json`" + ` flag generates conveniently computer readable output, e.g.
{
"total": 18253611008,

View file

@ -553,7 +553,7 @@ func Main() {
setupRootCommand(Root)
AddBackendFlags()
if err := Root.Execute(); err != nil {
if strings.HasPrefix(err.Error(), "unknown command") {
if strings.HasPrefix(err.Error(), "unknown command") && selfupdateEnabled {
Root.PrintErrf("You could use '%s selfupdate' to get latest features.\n\n", Root.CommandPath())
}
log.Fatalf("Fatal error: %v", err)

View file

@ -21,6 +21,7 @@ import (
"github.com/rclone/rclone/cmd/mountlib"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/lib/atexit"
"github.com/rclone/rclone/lib/buildinfo"
"github.com/rclone/rclone/vfs"
)
@ -35,6 +36,7 @@ func init() {
cmd.Aliases = append(cmd.Aliases, "cmount")
}
mountlib.AddRc("cmount", mount)
buildinfo.Tags = append(buildinfo.Tags, "cmount")
}
// Find the option string in the current options

View file

@ -36,7 +36,7 @@ var commandDefinition = &cobra.Command{
Download a URL's content and copy it to the destination without saving
it in temporary storage.
Setting ` + "`--auto-filename`" + `will cause the file name to be retrieved from
Setting ` + "`--auto-filename`" + ` will cause the file name to be retrieved from
the from URL (after any redirections) and used in the destination
path. With ` + "`--print-filename`" + ` in addition, the resuling file name will
be printed.

View file

@ -334,7 +334,7 @@ metadata about files like in UNIX. One case that may arise is that other program
(incorrectly) interprets this as the file being accessible by everyone. For example
an SSH client may warn about "unprotected private key file".
WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option "FileSecurity",
WinFsp 2021 (version 1.9) introduces a new FUSE option "FileSecurity",
that allows the complete specification of file security descriptors using
[SDDL](https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
With this you can work around issues such as the mentioned "unprotected private key file"

View file

@ -1,3 +1,5 @@
// +build !noselfupdate
package selfupdate
// Note: "|" will be replaced by backticks in the help string below
@ -27,7 +29,7 @@ If the old version contains only dots and digits (for example |v1.54.0|)
then it's a stable release so you won't need the |--beta| flag. Beta releases
have an additional information similar to |v1.54.0-beta.5111.06f1c0c61|.
(if you are a developer and use a locally built rclone, the version number
will end with |-DEV|, you will have to rebuild it as it obvisously can't
will end with |-DEV|, you will have to rebuild it as it obviously can't
be distributed).
If you previously installed rclone via a package manager, the package may

View file

@ -0,0 +1,11 @@
// +build noselfupdate
package selfupdate
import (
"github.com/rclone/rclone/lib/buildinfo"
)
func init() {
buildinfo.Tags = append(buildinfo.Tags, "noselfupdate")
}

View file

@ -1,3 +1,5 @@
// +build !noselfupdate
package selfupdate
import (
@ -143,14 +145,9 @@ func InstallUpdate(ctx context.Context, opt *Options) error {
return errors.New("--stable and --beta are mutually exclusive")
}
gotCmount := false
for _, tag := range buildinfo.Tags {
if tag == "cmount" {
gotCmount = true
break
}
}
if gotCmount && !cmount.ProvidedBy(runtime.GOOS) {
// The `cmount` tag is added by cmd/cmount/mount.go only if build is static.
_, tags := buildinfo.GetLinkingAndTags()
if strings.Contains(" "+tags+" ", " cmount ") && !cmount.ProvidedBy(runtime.GOOS) {
return errors.New("updating would discard the mount FUSE capability, aborting")
}

View file

@ -1,3 +1,5 @@
// +build !noselfupdate
package selfupdate
import (

View file

@ -1,3 +1,5 @@
// +build !noselfupdate
package selfupdate
import (

View file

@ -1,4 +1,5 @@
// +build !windows,!plan9,!js
// +build !noselfupdate
package selfupdate

View file

@ -1,4 +1,5 @@
// +build plan9 js
// +build !noselfupdate
package selfupdate

View file

@ -1,4 +1,5 @@
// +build windows
// +build !noselfupdate
package selfupdate

View file

@ -0,0 +1,5 @@
// +build noselfupdate
package cmd
const selfupdateEnabled = false

View file

@ -0,0 +1,7 @@
// +build !noselfupdate
package cmd
// This constant must be in the `cmd` package rather than `cmd/selfupdate`
// to prevent build failure due to dependency loop.
const selfupdateEnabled = true

View file

@ -5,6 +5,44 @@ description: "Rclone Changelog"
# Changelog
## v1.55.1 - 2021-04-26
[See commits](https://github.com/rclone/rclone/compare/v1.55.0...v1.55.1)
* Bug Fixes
* selfupdate
* Dont detect FUSE if build is static (Ivan Andreev)
* Add build tag noselfupdate (Ivan Andreev)
* sync: Fix incorrect error reported by graceful cutoff (Nick Craig-Wood)
* install.sh: fix macOS arm64 download (Nick Craig-Wood)
* build: Fix version numbers in android branch builds (Nick Craig-Wood)
* docs
* Contributing.md: update setup instructions for go1.16 (Nick Gaya)
* WinFsp 2021 is out of beta (albertony)
* Minor cleanup of space around code section (albertony)
* Fixed some typos (albertony)
* VFS
* Fix a code path which allows dirty data to be removed causing data loss (Nick Craig-Wood)
* Compress
* Fix compressed name regexp (buengese)
* Drive
* Fix backend copyid of google doc to directory (Nick Craig-Wood)
* Don't open browser when service account... (Ansh Mittal)
* Dropbox
* Add missing team_data.member scope for use with --impersonate (Nick Craig-Wood)
* Fix About after scopes changes - rclone config reconnect needed (Nick Craig-Wood)
* Fix Unable to decrypt returned paths from changeNotify (Nick Craig-Wood)
* FTP
* Fix implicit TLS (Ivan Andreev)
* Onedrive
* Work around for random "Unable to initialize RPS" errors (OleFrost)
* SFTP
* Revert sftp library to v1.12.0 from v1.13.0 to fix performance regression (Nick Craig-Wood)
* Fix Update ReadFrom failed: failed to send packet: EOF errors (Nick Craig-Wood)
* Zoho
* Fix error when region isn't set (buengese)
* Do not ask for mountpoint twice when using headless setup (buengese)
## v1.55.0 - 2021-03-31
[See commits](https://github.com/rclone/rclone/compare/v1.54.0...v1.55.0)

View file

@ -12,10 +12,10 @@ Get quota information from the remote.
## Synopsis
`rclone about`prints quota information about a remote to standard
`rclone about` prints quota information about a remote to standard
output. The output is typically used, free, quota and trash contents.
E.g. Typical output from`rclone about remote:`is:
E.g. Typical output from `rclone about remote:` is:
Total: 17G
Used: 7.444G
@ -43,7 +43,7 @@ Applying a `--full` flag to the command prints the bytes in full, e.g.
Trashed: 104857602
Other: 8849156022
A `--json`flag generates conveniently computer readable output, e.g.
A `--json` flag generates conveniently computer readable output, e.g.
{
"total": 18253611008,

View file

@ -15,7 +15,7 @@ Copy url content to dest.
Download a URL's content and copy it to the destination without saving
it in temporary storage.
Setting `--auto-filename`will cause the file name to be retrieved from
Setting `--auto-filename` will cause the file name to be retrieved from
the from URL (after any redirections) and used in the destination
path. With `--print-filename` in addition, the resuling file name will
be printed.

View file

@ -184,7 +184,7 @@ metadata about files like in UNIX. One case that may arise is that other program
(incorrectly) interprets this as the file being accessible by everyone. For example
an SSH client may warn about "unprotected private key file".
WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option "FileSecurity",
WinFsp 2021 (version 1.9) introduces a new FUSE option "FileSecurity",
that allows the complete specification of file security descriptors using
[SDDL](https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
With this you can work around issues such as the mentioned "unprotected private key file"

View file

@ -37,7 +37,7 @@ If the old version contains only dots and digits (for example `v1.54.0`)
then it's a stable release so you won't need the `--beta` flag. Beta releases
have an additional information similar to `v1.54.0-beta.5111.06f1c0c61`.
(if you are a developer and use a locally built rclone, the version number
will end with `-DEV`, you will have to rebuild it as it obvisously can't
will end with `-DEV`, you will have to rebuild it as it obviously can't
be distributed).
If you previously installed rclone via a package manager, the package may

View file

@ -654,7 +654,7 @@ If you run `rclone config file` you will see where the default
location is for you.
Use this flag to override the config location, e.g. `rclone
--config=".myconfig" .config`.
--config=".myconfig" config`.
If the location is set to empty string `""` or the special value
`/notfound`, or the os null device represented by value `NUL` on
@ -2119,7 +2119,7 @@ mys3:
Note that if you want to create a remote using environment variables
you must create the `..._TYPE` variable as above.
Note also that now rclone has [connectionstrings](#connection-strings),
Note also that now rclone has [connection strings](#connection-strings),
it is probably easier to use those instead which makes the above example
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:

View file

@ -153,7 +153,7 @@ These flags are available for every command.
--use-json-log Use json log format.
--use-mmap Use mmap allocator (see docs).
--use-server-modtime Use server modified time instead of object metadata
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.0")
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.55.1")
-v, --verbose count Print lots more stuff (repeat for more)
```

View file

@ -101,12 +101,12 @@ case "$OS_type" in
i?86|x86)
OS_type='386'
;;
aarch64|arm64)
OS_type='arm64'
;;
arm*)
OS_type='arm'
;;
aarch64)
OS_type='arm64'
;;
*)
echo 'OS type not supported'
exit 2

View file

@ -1 +1 @@
v1.55.0
v1.55.1

View file

@ -264,6 +264,9 @@ func (s *syncCopyMove) processError(err error) {
// Cancel the march and stop the pipes
s.inCancel()
}
} else if err == context.Canceled && s.inCtx.Err() != nil {
// Ignore context Canceled if we have called s.inCancel()
return
}
s.errorMu.Lock()
defer s.errorMu.Unlock()

View file

@ -1,4 +1,4 @@
package fs
// Version of rclone
var Version = "v1.55.0-DEV"
var Version = "v1.55.1-DEV"

2
go.mod
View file

@ -45,7 +45,7 @@ require (
github.com/nsf/termbox-go v0.0.0-20210114135735-d04385b850e8
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.0
github.com/pkg/sftp v1.12.0
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/procfs v0.3.0 // indirect
github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8

5
go.sum
View file

@ -500,8 +500,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/sftp v1.13.0 h1:Riw6pgOKK41foc1I1Uu03CjvbLZDXeGpInycM4shXoI=
github.com/pkg/sftp v1.13.0/go.mod h1:41g+FIPlQUTDCveupEmEA65IoiQFrtgCeDopC4ajGIM=
github.com/pkg/sftp v1.12.0 h1:/f3b24xrDhkhddlaobPe2JgBqfdt+gC/NYl0QY9IOuI=
github.com/pkg/sftp v1.12.0/go.mod h1:fUqqXB5vEgVCZ131L+9say31RAri6aF6KDViawhxKK8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@ -685,6 +685,7 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=

View file

@ -1,7 +0,0 @@
// +build cmount
package buildinfo
func init() {
Tags = append(Tags, "cmount")
}

View file

@ -5,7 +5,10 @@ import (
"strings"
)
// Tags contains slice of build tags
// Tags contains slice of build tags.
// The `cmount` tag is added by cmd/cmount/mount.go only if build is static.
// The `noselfupdate` tag is added by cmd/selfupdate/noselfupdate.go
// Other tags including `cgo` are detected in this package.
var Tags []string
// GetLinkingAndTags tells how the rclone executable was linked

119
rclone.1 generated
View file

@ -1,7 +1,7 @@
.\"t
.\" Automatically generated by Pandoc 2.5
.\"
.TH "rclone" "1" "Mar 31, 2021" "User Manual" ""
.TH "rclone" "1" "Apr 26, 2021" "User Manual" ""
.hy
.SH Rclone syncs your files to cloud storage
.PP
@ -1838,12 +1838,12 @@ commands, flags and backends.
Get quota information from the remote.
.SS Synopsis
.PP
\f[C]rclone about\f[R]prints quota information about a remote to
\f[C]rclone about\f[R] prints quota information about a remote to
standard output.
The output is typically used, free, quota and trash contents.
.PP
E.g.
Typical output from\f[C]rclone about remote:\f[R]is:
Typical output from \f[C]rclone about remote:\f[R] is:
.IP
.nf
\f[C]
@ -1887,7 +1887,7 @@ Other: 8849156022
\f[R]
.fi
.PP
A \f[C]\-\-json\f[R]flag generates conveniently computer readable
A \f[C]\-\-json\f[R] flag generates conveniently computer readable
output, e.g.
.IP
.nf
@ -2558,7 +2558,7 @@ Copy url content to dest.
Download a URL\[aq]s content and copy it to the destination without
saving it in temporary storage.
.PP
Setting \f[C]\-\-auto\-filename\f[R]will cause the file name to be
Setting \f[C]\-\-auto\-filename\f[R] will cause the file name to be
retrieved from the from URL (after any redirections) and used in the
destination path.
With \f[C]\-\-print\-filename\f[R] in addition, the resuling file name
@ -3677,7 +3677,7 @@ this as the file being accessible by everyone.
For example an SSH client may warn about \[dq]unprotected private key
file\[dq].
.PP
WinFsp 2021 (version 1.9, still in beta) introduces a new FUSE option
WinFsp 2021 (version 1.9) introduces a new FUSE option
\[dq]FileSecurity\[dq], that allows the complete specification of file
security descriptors using
SDDL (https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
@ -4632,7 +4632,7 @@ Beta releases have an additional information similar to
\f[C]v1.54.0\-beta.5111.06f1c0c61\f[R].
(if you are a developer and use a locally built rclone, the version
number will end with \f[C]\-DEV\f[R], you will have to rebuild it as it
obvisously can\[aq]t be distributed).
obviously can\[aq]t be distributed).
.PP
If you previously installed rclone via a package manager, the package
may include local documentation or configure services.
@ -8720,7 +8720,7 @@ If you run \f[C]rclone config file\f[R] you will see where the default
location is for you.
.PP
Use this flag to override the config location, e.g.
\f[C]rclone \-\-config=\[dq].myconfig\[dq] .config\f[R].
\f[C]rclone \-\-config=\[dq].myconfig\[dq] config\f[R].
.PP
If the location is set to empty string \f[C]\[dq]\[dq]\f[R] or the
special value \f[C]/notfound\f[R], or the os null device represented by
@ -10363,7 +10363,7 @@ mys3:
Note that if you want to create a remote using environment variables you
must create the \f[C]..._TYPE\f[R] variable as above.
.PP
Note also that now rclone has connectionstrings, it is probably easier
Note also that now rclone has connection strings, it is probably easier
to use those instead which makes the above example
.IP
.nf
@ -15925,7 +15925,7 @@ These flags are available for every command.
\-\-use\-json\-log Use json log format.
\-\-use\-mmap Use mmap allocator (see docs).
\-\-use\-server\-modtime Use server modified time instead of object metadata
\-\-user\-agent string Set the user\-agent to a specified string. The default is rclone/ version (default \[dq]rclone/v1.55.0\[dq])
\-\-user\-agent string Set the user\-agent to a specified string. The default is rclone/ version (default \[dq]rclone/v1.55.1\[dq])
\-v, \-\-verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
@ -39340,6 +39340,105 @@ Options:
.IP \[bu] 2
\[dq]error\[dq]: return an error based on option value
.SH Changelog
.SS v1.55.1 \- 2021\-04\-26
.PP
See commits (https://github.com/rclone/rclone/compare/v1.55.0...v1.55.1)
.IP \[bu] 2
Bug Fixes
.RS 2
.IP \[bu] 2
selfupdate
.RS 2
.IP \[bu] 2
Dont detect FUSE if build is static (Ivan Andreev)
.IP \[bu] 2
Add build tag noselfupdate (Ivan Andreev)
.RE
.IP \[bu] 2
sync: Fix incorrect error reported by graceful cutoff (Nick Craig\-Wood)
.IP \[bu] 2
install.sh: fix macOS arm64 download (Nick Craig\-Wood)
.IP \[bu] 2
build: Fix version numbers in android branch builds (Nick Craig\-Wood)
.IP \[bu] 2
docs
.RS 2
.IP \[bu] 2
Contributing.md: update setup instructions for go1.16 (Nick Gaya)
.IP \[bu] 2
WinFsp 2021 is out of beta (albertony)
.IP \[bu] 2
Minor cleanup of space around code section (albertony)
.IP \[bu] 2
Fixed some typos (albertony)
.RE
.RE
.IP \[bu] 2
VFS
.RS 2
.IP \[bu] 2
Fix a code path which allows dirty data to be removed causing data loss
(Nick Craig\-Wood)
.RE
.IP \[bu] 2
Compress
.RS 2
.IP \[bu] 2
Fix compressed name regexp (buengese)
.RE
.IP \[bu] 2
Drive
.RS 2
.IP \[bu] 2
Fix backend copyid of google doc to directory (Nick Craig\-Wood)
.IP \[bu] 2
Don\[aq]t open browser when service account...
(Ansh Mittal)
.RE
.IP \[bu] 2
Dropbox
.RS 2
.IP \[bu] 2
Add missing team_data.member scope for use with \-\-impersonate (Nick
Craig\-Wood)
.IP \[bu] 2
Fix About after scopes changes \- rclone config reconnect needed (Nick
Craig\-Wood)
.IP \[bu] 2
Fix Unable to decrypt returned paths from changeNotify (Nick
Craig\-Wood)
.RE
.IP \[bu] 2
FTP
.RS 2
.IP \[bu] 2
Fix implicit TLS (Ivan Andreev)
.RE
.IP \[bu] 2
Onedrive
.RS 2
.IP \[bu] 2
Work around for random \[dq]Unable to initialize RPS\[dq] errors
(OleFrost)
.RE
.IP \[bu] 2
SFTP
.RS 2
.IP \[bu] 2
Revert sftp library to v1.12.0 from v1.13.0 to fix performance
regression (Nick Craig\-Wood)
.IP \[bu] 2
Fix Update ReadFrom failed: failed to send packet: EOF errors (Nick
Craig\-Wood)
.RE
.IP \[bu] 2
Zoho
.RS 2
.IP \[bu] 2
Fix error when region isn\[aq]t set (buengese)
.IP \[bu] 2
Do not ask for mountpoint twice when using headless setup (buengese)
.RE
.SS v1.55.0 \- 2021\-03\-31
.PP
See commits (https://github.com/rclone/rclone/compare/v1.54.0...v1.55.0)

View file

@ -774,6 +774,9 @@ func (item *Item) reload(ctx context.Context) error {
// check the fingerprint of an object and update the item or delete
// the cached file accordingly
//
// If we have local modifications then they take precedence
// over a change in the remote
//
// It ensures the file is the correct size for the object
//
// call with lock held
@ -781,8 +784,12 @@ func (item *Item) _checkObject(o fs.Object) error {
if o == nil {
if item.info.Fingerprint != "" {
// no remote object && local object
// remove local object
item._remove("stale (remote deleted)")
// remove local object unless dirty
if !item.info.Dirty {
item._remove("stale (remote deleted)")
} else {
fs.Debugf(item.name, "vfs cache: remote object has gone but local object modified - keeping it")
}
} else {
// no remote object && no local object
// OK
@ -793,8 +800,12 @@ func (item *Item) _checkObject(o fs.Object) error {
if item.info.Fingerprint != "" {
// remote object && local object
if remoteFingerprint != item.info.Fingerprint {
fs.Debugf(item.name, "vfs cache: removing cached entry as stale (remote fingerprint %q != cached fingerprint %q)", remoteFingerprint, item.info.Fingerprint)
item._remove("stale (remote is different)")
if !item.info.Dirty {
fs.Debugf(item.name, "vfs cache: removing cached entry as stale (remote fingerprint %q != cached fingerprint %q)", remoteFingerprint, item.info.Fingerprint)
item._remove("stale (remote is different)")
} else {
fs.Debugf(item.name, "vfs cache: remote object has changed but local object modified - keeping it (remote fingerprint %q != cached fingerprint %q)", remoteFingerprint, item.info.Fingerprint)
}
}
} else {
// remote object && no local object