Nick Craig-Wood
ba43acb6aa
sync: fix TestCopyEmptyDirectories after ModifyWindow changes #2310
2018-06-04 21:41:25 +01:00
ishuah
d758e1908e
copy: create (pseudo copy) empty source directories to destination - fixes #1837
2018-06-04 11:01:14 +01:00
ishuah
737aed8412
Ensure items in srcEmptyDirs are actually empty
2018-06-04 11:01:14 +01:00
Stefan
4009fb67c8
fs: calculate ModifyWindow each time on the fly instead of relying on global state - see #2319 , #2328
2018-06-03 20:45:34 +02:00
Nick Craig-Wood
3ef938ebde
lsf: add --absolute flag to add a leading / onto path names
2018-06-03 10:42:34 +01:00
Kasper Byrdal Nielsen
aad75e6720
check: Add one-way argument
...
--one-way argument will check that all files on source matches the files on detination,
but not the other way. For example files present on destination but not on source will not
trigger an error.
Fixes : #1526
2018-05-31 09:42:16 +01:00
Nick Craig-Wood
3a2248aa5f
rc: add core/gc to run a garbage collection on demand
2018-05-24 15:10:28 +01:00
Nick Craig-Wood
573ef4c8ee
rc: enable go profiling by default on the --rc port
...
This means you can use the pprof tool on a running rclone, eg
go tool pprof http://localhost:5572/debug/pprof/heap
2018-05-24 15:10:28 +01:00
Nick Craig-Wood
512f4b4487
Update error checking on fmt.Fprint* after errcheck update
...
Now we need to check or ignore errors on fmt.Fprint* explicitly -
previously errcheck just ignored them for us.
2018-05-22 09:41:13 +01:00
Nick Craig-Wood
8e625e0bc3
config: add ConfirmWithDefault to change the default on AutoConfig
2018-05-16 09:09:41 +01:00
Nick Craig-Wood
e56be0dfd8
lsf: Add --csv flag for compliant CSV output
2018-05-13 12:18:21 +01:00
Nick Craig-Wood
2a32e2d838
operations: turn ListFormatted into a Format method on ListFormat
2018-05-13 12:17:55 +01:00
Nick Craig-Wood
f77efc7649
lsf: Add 'm' format specifier to show the MimeType
2018-05-13 12:17:55 +01:00
Nick Craig-Wood
aadbcce486
fs: Add MimeTypeDirEntry to return the MimeType of a DirEntry
2018-05-13 12:17:55 +01:00
Nick Craig-Wood
909c3a92d6
lsf: implement 'i' format for showing object ID - fixes #1476
2018-05-13 12:17:55 +01:00
Nick Craig-Wood
826975c341
fs: add Optional ID() method to Object and implement it in backends
...
ID() shows the internal ID of the Object if available.
2018-05-13 12:17:55 +01:00
Nick Craig-Wood
e80ae4e09c
build: remove unused struct fields spotted by structcheck
2018-05-05 17:32:41 +01:00
Nick Craig-Wood
1320e84bc2
build: remove unused code spotted by the deadcode linter
2018-05-05 17:32:41 +01:00
Nick Craig-Wood
cb5bd47e61
build: fix errors spotted by ineffassign linter
...
These were mostly caused by shadowing err and a good fraction of them
will have caused errors not to be propagated properly.
2018-05-05 17:32:41 +01:00
Nick Craig-Wood
f95835d613
fserrors: Look deeper into errors for Fatal/Retry/NoRetry errors.
...
Before this change fatal errors which were wrapped in a system error (eg a
URLError) were not recognised as fatal errors.
2018-05-05 12:58:28 +01:00
Nick Craig-Wood
be79b47a7a
sync: log when we abandon the sync due to a fatal error
2018-05-05 12:58:28 +01:00
Nick Craig-Wood
be22735609
fs/accounting: fix deadlock on GetBytes
...
A deadlock could occur since we have now put a mutex on GetBytes from
StatsInfo.String (s.mu) - progress (acc.statmu) and read (acc.statmu)
- GetBytes (s.mu).
Fix this by giving stringSet its own locking and excluding the call
which caused the deadlock from the mutex in StatsInfo.String.
2018-05-05 12:58:28 +01:00
Nick Craig-Wood
1b1b3c13cd
sync: add a test for aborting on max upload
2018-05-05 12:58:28 +01:00
Nick Craig-Wood
5c128272fd
Implement --max-transfer flag to quit transferring at a limit #1655
2018-05-05 12:58:28 +01:00
Nick Craig-Wood
d178233e74
sync,march: check the cancel context on every channel send and receive
...
This fixes a deadlock on sync when all the copying channels receive a
Fatal Error.
2018-05-05 12:58:28 +01:00
Fabian Möller
9fdf273614
fs: improve ChunkedReader
...
- make Close permanent and return errors afterwards
- use RangeSeek from the wrapped reader if present
- add a limit to chunk growth
- correct RangeSeek interface behavior
- add tests
2018-05-05 12:49:42 +01:00
Nick Craig-Wood
55674c0bfc
Start v1.41-DEV development
2018-04-28 12:37:55 +01:00
Nick Craig-Wood
e4c380b2a8
Version v1.41
2018-04-28 11:46:27 +01:00
Nick Craig-Wood
74cbdea0ef
Revert "copy: create (pseudo copy) empty source directories to destination"
...
Unfortunately this commit attempts to create every directory rather
than just the empty ones, so will need re-working.
Removing this feature for the 1.41 release
This reverts commit 0daced29db
.
2018-04-28 10:02:32 +01:00
ishuah
0daced29db
copy: create (pseudo copy) empty source directories to destination - fixes #1837
2018-04-27 16:15:32 +01:00
Richard Yang
a81ec00a8c
dedupe: Add dedupe largest functionality - fixes #2269
2018-04-26 16:21:07 +01:00
Nick Craig-Wood
9f04ce282e
rc: fix setting bwlimit to unlimited
2018-04-26 12:21:29 +01:00
Nick Craig-Wood
764440068e
filter: fix --min-age and --max-age together check
...
Somehow in the code reorganisation of
11da2a6c9b
the check for --min-age and
--max-age got switched around. This commit fixes that and means you
can use --min-age and --max-age together.
2018-04-26 09:17:22 +01:00
Nick Craig-Wood
a703216286
filter: take double negatives out of filter flag help
2018-04-26 09:17:13 +01:00
Nick Craig-Wood
9ab2521ef2
rc: autogenerate and tidy the docs and commands
...
* Rename rc/pid -> core/pid
* Sort the output of `rc list`
* Make a script to autogenerate the docs
* Tidy docs
2018-04-23 20:57:17 +01:00
Nick Craig-Wood
21a10e58c9
rc: implement core/memstats to print internal memory usage info
2018-04-23 20:49:36 +01:00
Nick Craig-Wood
24980d7123
config: fix typo in error message #2268
2018-04-21 22:49:30 +01:00
Nick Craig-Wood
bcdb7719c6
fs/hash: install QuickXorHash as a supported rclone hash type #2262
2018-04-20 21:02:57 +01:00
Nick Craig-Wood
c51d97c752
hashsum: make generic tool for any hash to produce md5sum like output
2018-04-20 21:02:37 +01:00
Nick Craig-Wood
ef3bcec76c
fs: Extend SizeSuffix to include TB and PB for rclone about
2018-04-17 21:53:42 +01:00
Nick Craig-Wood
1ac6dacf0f
about: complete other providers and re-work internals
...
* Implement about for:
* local, crypt, cache, drive, swift, hubic, onedrive, pcloud, dropbox
* Implement `--json` and `---full` flag for `rclone about`
* change About interface to return a Usage structure
* Remove operations.About as it is too thin an interface
* Implement Integration test
Relates to #1138 and #1564
2018-04-17 21:53:27 +01:00
a-roussos
94e277d759
about: add new command 'about' to get quota info from a remote
...
Implemented for drive only.
Relates to #1138 and #1564 .
2018-04-17 21:50:14 +01:00
Nick Craig-Wood
8c3740c2c5
config: Improve the Provider matching to have a negated match #2140
...
This makes it easier to make classes of provider in the config.
2018-04-13 16:06:37 +01:00
Giri Badanahatti
acd5d4377e
config,s3: hierarchical configuration support #2140
...
This introduces a method of making provider specific configuration
within a remote. This is useful particularly in s3.
This commit does the basic configuration in S3 for IBM COS.
2018-04-13 16:05:35 +01:00
Peter Baumgartner
1db68571fd
s3,swift: Add --use-server-modtime
...
`--use-server-modtime` stops s3 and swift retrieving the modtime from metadata which enables a fast sync mode with the `--update` flag.
2018-04-13 13:32:17 +01:00
Nick Craig-Wood
d97fe3b824
fs/operations: make dedupe work with mega
...
* factor into its own files
* remove assumptions about having a given hash type
* make tests work if the remote has no hash
2018-04-13 13:23:55 +01:00
Nick Craig-Wood
dcf8334673
fs: add --dump goroutines and --dump openfiles
...
These are developer flags useful for tracking down resource leaks.
2018-04-11 20:55:58 +01:00
Nick Craig-Wood
37be78705d
fs/fshttp: limit MaxIdleConns and MaxIdleConnsPerHost
...
Before this change mega (which uses a different host per download)
would open too many sockets.
2018-04-11 20:51:28 +01:00
Michael P. Dubner
92b266d361
rc: new call rc/pid - closes #2211
2018-04-09 13:33:04 +01:00
Nick Craig-Wood
cbec59146a
lsf: make sure we use localtime in tests - fixes Box integration tests
...
This problem was introduced with eca99b33c0
. It seems Box is the only
remote which converts time zones, so if you give it a GMT time zone,
it returns a PST time zone which represents the same instant.
2018-04-09 11:46:49 +01:00
Nick Craig-Wood
be54fd8f70
Remove builds conditional on go1.7 since that is now guaranteed #2154
...
Old fallback code was deleted and the go1.7 style code inlined where
appropriate.
2018-04-07 11:42:55 +01:00
Nick Craig-Wood
e5be471ce0
Use io.SeekStart/End/Current constants now for go1.7+ #2154
2018-04-07 11:42:36 +01:00
Nick Craig-Wood
80588a5a6b
Replace "golang.org/x/net/context" with "context" for go1.7+ #2154
2018-04-07 11:42:08 +01:00
Nick Craig-Wood
67023f0040
Require go1.7 for compilation #2154
...
* Update the travis tests to exclude go1.6
* Update the compile check to require go1.7+
* Update misc go1.6 workarounds marked in the source
2018-04-06 20:18:14 +01:00
Matt Holt
e13f65b953
serve restic: Print actual listener address
2018-04-04 14:56:26 +01:00
Nick Craig-Wood
eca99b33c0
lsd,lsf: make sure all times we output are in local time - fixes #2183
...
Previous to this change times from lsd/lsf were output in whatever
timezone they were in whereas times from lsl were converted to
localtime.
2018-04-01 15:40:04 +01:00
Stefan
a8267d1628
link: allow creating public link to files and folders - closes #1562
2018-03-29 09:10:19 +02:00
Mateusz Pabian
91b068ad3a
sync: implement --ignore-errors - fixes #642
2018-03-23 22:01:10 +00:00
Nick Craig-Wood
940df88eb2
Start v1.40-DEV development
2018-03-19 14:20:48 +00:00
Nick Craig-Wood
26f1c55987
Version v1.40
2018-03-19 10:06:13 +00:00
Stefan
86892467d9
config: load config file only on first access ( closes #1659 , closes #2096 ) ( #2147 )
2018-03-17 12:36:30 +01:00
Nick Craig-Wood
4295428a0f
fs/accounting: add remote control of bwlimit
2018-03-17 10:34:02 +00:00
Nick Craig-Wood
5bf639048f
sync: log an error that --track-renames doesn't work with sync or move
...
Fixes #2008
2018-03-17 10:34:02 +00:00
remusb
97b48cf988
rc: add support for Go 1.6
2018-03-14 22:58:20 +02:00
Nick Craig-Wood
86e5a35491
Implement Remote Control for rclone #2111
...
This implements a remote control protocol activated with the --rc flag
and a new command `rclone rc` to use that interface.
Still to do
* docs - need finishing
* tests
2018-03-14 22:58:20 +02:00
Nick Craig-Wood
dfd0f4c5a4
sync: when using --backup-dir don't delete files if we can't set their modtime
...
This is a problem when syncing a file which just needed its modtime
set with dropbox which can't set the mod time of a file without
re-uploading it.
Before this change we would delete the file, then the server side move
would fail moving the file to the backup-dir because it no longer
existed.
After this change the destination file is moved to the backup-dir
instead of being deleted and the new file is uploaded.
Fixes #2134
2018-03-13 16:05:06 +00:00
Nick Craig-Wood
0c9dc006c5
fs: make display of default values of --min-age/--max-age be off - Fixes #2121
2018-03-13 09:06:07 +00:00
Remus Bunduc
70f07fd3ac
fs: add ChangeNotify and backend support for it ( #2094 )
...
* fs: rename DirChangeNotify to ChangeNotify
* cache: switch to ChangeNotify
* ChangeNotify: keep order of notifications
2018-03-08 22:03:34 +02:00
Nick Craig-Wood
e0eb666dbf
fs/walk: fix new golint warning about unused variables in range
2018-03-02 17:01:58 +00:00
Nick Craig-Wood
abc736df1d
cat: Use RangeOption for limited fetches to make more efficient #1825
2018-02-19 18:00:39 +00:00
Nick Craig-Wood
ab0d06eb16
fs: Make RangeOption mandatory #1825
2018-02-19 18:00:39 +00:00
Mateusz
afc963ed92
config: retry saving the config after failure - fixes #2060
2018-02-19 17:59:27 +00:00
Fabian Möller
451cd6d971
fs: add ChunkedReader
2018-02-19 15:45:24 +00:00
Fabian Möller
a647c54888
fs: add RangeSeeker interface
2018-02-19 15:45:24 +00:00
Nick Craig-Wood
a5c3bcc9c7
fshttp: fix idle timeouts for HTTP connections #2057
...
Now we only nudge on the idle timeout after a successful Read or Write
which returns some bytes and no errors.
2018-02-16 10:35:41 +00:00
Bjørn Erik Pedersen
ab8c0a81fa
Add a delete threshold to sync (--max-delete)
...
Fixes #959
2018-02-12 11:29:58 +00:00
Nick Craig-Wood
d0d6b83a7a
fs/accounting: rework to enable accounting to work with crypt and b2
...
This removes the old system of part accounting and replaces it with a
system of popping off the accounting reader and wrapping up new ones
as necessary.
This makes it much easier to carry the context down the chain of
wrapped readers and get the limiting as near as possible to the
output. This makes the accounting more accurate and the bandwidth
limiting smoother.
Fixes #2029 and Fixes #1443
2018-02-02 15:14:41 +00:00
Nick Craig-Wood
bea02fcf52
fs/accounting: factor into separate files without changing functionality
2018-02-02 15:14:40 +00:00
Nick Craig-Wood
6fb868e00c
config: fix --log-level flag after code reorganization - fixes #2043
2018-02-02 14:07:44 +00:00
Nick Craig-Wood
8df78f2b6d
operations: ignore size of objects when they are < 0 #320
...
This allows google docs to be transferred and checked correctly.
2018-01-31 16:22:05 +00:00
Nick Craig-Wood
2eb5cfb7ad
fs: Formalize the ObjectUnWrapper interface
2018-01-31 16:21:41 +00:00
Nick Craig-Wood
fe52502f19
fs: Adjust RangeOption.Decode to return -1 for read to end
...
A Range request can never request 0 bytes however this change was made
to make a clearer signal that the limit means read to the end.
Add test and more documentation and fixup uses
2018-01-27 14:31:29 +00:00
Nick Craig-Wood
9a73688e3a
fs: Add ParseRangeOption to parse incoming Range: requests
2018-01-27 13:16:37 +00:00
Nick Craig-Wood
bc3ee977f4
fs/hash: move interface assertion to tests so it doesn't pull in spf13/flag
2018-01-26 14:35:18 +00:00
Nick Craig-Wood
a6833b68ca
local: factor RangeOption code to Decode() method and readers.LimitedReadCloser #1825
2018-01-22 19:44:00 +00:00
Nick Craig-Wood
d876392d15
onedrive: Factor code into fs.FixRangeOption
2018-01-22 17:05:00 +00:00
Nick Craig-Wood
84bc4dc142
Clarify RangeOption semantics
2018-01-21 09:51:28 +00:00
Nick Craig-Wood
ee66419a27
fs/fserrors: Add test for error from #1964
2018-01-19 17:07:40 +00:00
Nick Craig-Wood
5ad226ab54
fs: Add dir option to fs.Purge #1891
...
Purge optional interface needs fixing too.
2018-01-19 11:45:50 +00:00
Nick Craig-Wood
97c414f025
config/hash: rename more symbols after factoring into own package
2018-01-18 20:27:52 +00:00
Nick Craig-Wood
71722b5b95
config: factor Obscure and Reveal into its own package
2018-01-18 20:19:55 +00:00
Ernest Borowski
5cce74d630
flags: remove --no-traverse flag because it is obsolete - fixes #1813
...
Signed-off-by: Ernest Borowski <er.borowski@gmail.com>
2018-01-18 11:00:25 +00:00
Iakov Davydov
acd55a8f65
local, fs: --exclude-if-present ignores directories which it doesn't have permission for - fixes #1959
2018-01-16 20:00:16 +00:00
Nick Craig-Wood
11da2a6c9b
Break the fs package up into smaller parts.
...
The purpose of this is to make it easier to maintain and eventually to
allow the rclone backends to be re-used in other projects without
having to use the rclone configuration system.
The new code layout is documented in CONTRIBUTING.
2018-01-15 17:51:14 +00:00
Nick Craig-Wood
b8b620f5c2
Move all backends into backend directory
2018-01-12 17:07:38 +00:00
Nick Craig-Wood
712e6a8085
lsf: fix integration tests
2018-01-11 13:52:15 +00:00
Will Gunn
5c7e8d5a2b
fs: Add --stats-file-name-length to specify the printed file name length for stats
...
Fixes #1206
2018-01-10 20:32:36 +00:00
Nick Craig-Wood
c74c3b37da
lsf: add option to print hashes
2018-01-06 17:53:37 +00:00
Nick Craig-Wood
7c71ee1a5b
fs: fix TestListFormat on remotes which return 0 as dir size not -1
2018-01-06 17:47:42 +00:00
Jakub Tasiemski
0d041602cf
cmd: new command lsf
2018-01-06 14:39:31 +00:00