mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
Compare commits
2 Commits
31df39d356
...
80e6389a50
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80e6389a50 | ||
|
|
a3ccf4d8a0 |
@@ -72,7 +72,7 @@ const (
|
||||
|
||||
// Globals
|
||||
var (
|
||||
errNotWithVersions = errors.New("can't modify or delete files in --b2-versions mode")
|
||||
errNotWithVersions = errors.New("can't modify files in --b2-versions mode")
|
||||
errNotWithVersionAt = errors.New("can't modify or delete files in --b2-version-at mode")
|
||||
)
|
||||
|
||||
@@ -2334,7 +2334,10 @@ func (f *Fs) OpenChunkWriter(ctx context.Context, remote string, src fs.ObjectIn
|
||||
func (o *Object) Remove(ctx context.Context) error {
|
||||
bucket, bucketPath := o.split()
|
||||
if o.fs.opt.Versions {
|
||||
return errNotWithVersions
|
||||
t, path := api.RemoveVersion(bucketPath)
|
||||
if !t.IsZero() {
|
||||
return o.fs.deleteByID(ctx, o.id, path)
|
||||
}
|
||||
}
|
||||
if o.fs.opt.VersionAt.IsSet() {
|
||||
return errNotWithVersionAt
|
||||
|
||||
@@ -1292,7 +1292,7 @@ func (f *ftpReadCloser) Close() error {
|
||||
// See: https://github.com/rclone/rclone/issues/3445#issuecomment-521654257
|
||||
if errX := textprotoError(err); errX != nil {
|
||||
switch errX.Code {
|
||||
case ftp.StatusTransfertAborted, ftp.StatusFileUnavailable, ftp.StatusAboutToSend:
|
||||
case ftp.StatusTransfertAborted, ftp.StatusFileUnavailable, ftp.StatusAboutToSend, ftp.StatusRequestedFileActionOK:
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ flag which permanently removes files on deletion instead of hiding
|
||||
them.
|
||||
|
||||
Old versions of files, where available, are visible using the
|
||||
`--b2-versions` flag.
|
||||
`--b2-versions` flag. These can be deleted as required with `delete`.
|
||||
|
||||
It is also possible to view a bucket as it was at a certain point in time,
|
||||
using the `--b2-version-at` flag. This will show the file versions as they
|
||||
|
||||
Reference in New Issue
Block a user