Commit Graph

4297 Commits

Author SHA1 Message Date
Jakob Borg
3d95135638 authors: Add dtchanpura 2017-05-16 10:47:29 +02:00
Jakob Borg
4db662e576 gui: Ensure failed items folder path contains separator (fixes #4143)
Windows specific, due to how we handle folder paths.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4149
2017-05-15 06:32:16 +00:00
Jakob Borg
1d15b8be9b cmd/syncthing: Warn when running as a super user (fixes #4123)
UID 0 on Unixes, SYSTEM SID on Windows.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4148
2017-05-15 05:42:21 +00:00
Jakob Borg
d25b15263a cmd/syncthing: Process handle should be closed 2017-05-14 18:06:27 +02:00
Wulf Weich
7931d956f7 gui: fix path breaking out of global changes modal (fixes #3895)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4146
2017-05-13 10:42:37 +00:00
Elliot Huffman
c9afabf09f etc: Update systemd docs URL
Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4145
2017-05-13 08:01:53 +00:00
Jakob Borg
c262f48bfe Merge branch 'release'
* release:
  cmd/syncthing: Fix CPU usage reporting (tick time)
2017-05-06 17:37:16 +02:00
Jakob Borg
8c108b4d20 cmd/syncthing: Fix CPU usage reporting (tick time) 2017-05-06 17:36:12 +02:00
Jakob Borg
ec137c9522 cmd/syncthing: Fix CPU usage reporting (tick time) 2017-05-06 17:35:07 +02:00
Jakob Borg
b17d7d8126 Merge branch 'release'
* release:
  cmd/syncthing: Report correct CPU usage on Windows (fixes #4133)
2017-05-05 16:20:35 +02:00
Jakob Borg
43569d8d36 cmd/syncthing: Report correct CPU usage on Windows (fixes #4133) 2017-05-05 16:16:43 +02:00
Jakob Borg
c4b527e5e9 cmd/syncthing: Report correct CPU usage on Windows (fixes #4133) 2017-05-05 16:12:59 +02:00
Jakob Borg
6386d079b0 gui: Don't reload concurrently with saving config when changing theme (fixes #4127) 2017-05-05 16:12:59 +02:00
Ben S
d2699a20fc gui: Display global changes timestamps in 24h format
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4130
2017-05-04 10:18:47 +00:00
Simon Frei
0b854dff9d lib/ignore: Don't match root (".")
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4122
2017-05-01 16:58:08 +00:00
Simon Frei
9de6cdddfd script: Ignore units and allow translated strings as translate-values
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4120
2017-04-29 15:48:00 +00:00
Jakob Borg
5045842f4f lib/config: Don't XML serialize deprecated minDiskFreePct 2017-04-27 14:46:19 +09:00
Jakob Borg
e0405de5bf lib/protocol: More descriptive errors on device ID parse failures 2017-04-27 14:45:35 +09:00
Jakob Borg
d6fbfc3545 lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965)
The folder already knew how to stop properly, but the fs.Walk() didn't
and can potentially take a very long time. This adds context support to
Walk and the underlying scanning stuff, and passes in an appropriate
context from above. The stop channel in model.folder is replaced with a
context for this purpose.

To test I added an infiniteFS that represents a large amount of data
(not actually infinite, but close) and verify that walking it is
properly stopped. For that to be implemented smoothly I moved out the
Walk function to it's own type, as typically the implementer of a new
filesystem type might not need or want to reimplement Walk.

It's somewhat tricky to test that this actually works properly on the
actual sendReceiveFolder and so on, as those are started from inside the
model and the filesystem isn't easily pluggable etc. Instead I've tested
that part manually by adding a huge folder and verifying that pause,
resume and reconfig do the right things by looking at debug output.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4117
2017-04-26 00:15:23 +00:00
Jakob Borg
bdaef44765 gui, man: Update docs & translations 2017-04-26 09:13:12 +09:00
Jakob Borg
488444354b lib/db: Don't panic
So, when first implementing the database layer I added panics on every
unexpected error condition mostly to be sure to flush out bugs and
inconsistencies. Then it became sort of standard, and we don't seem to
have many bugs here any more so the panics are usually caused by things
like checksum errors on read. But it's not an optimal user experience to
crash all the time.

Here I've weeded out most of the panics, while retaining a few "can't
happen" ones like errors on marshalling and write that we really can't
recover from.

For the rest, I'm mostly treating any read error as "entry didn't
exist". This should mean we'll rescan the file and correct the info (if
scanning) or treat it as a new file and do conflict handling (when
pulling). In some cases things like our global stats may be slightly
incorrect until a restart, if a database entry goes suddenly missing
during runtime.

All in all, I think this makes us a bit more robust and friendly without
introducing too many risks for the user. If the database is truly toast,
probably many other things on the system will be toast as well...

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4118
2017-04-25 22:52:37 +00:00
Jakob Borg
26654df48c gui: Restrict GUI listening ports to >1024, add help (fixes #4020)
This adds a pattern validator to the GUI listen port field that checks
for port numbers 1024 and above. Also adds a help link pointing to the
(new) page talking about GUI listen port numbers. That page has
information on how to work around the restriction, in general terms.

Also changes the header from "GUI Listen Addresses" to the singular
version, because we only support one listen address today.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4116
2017-04-24 07:19:28 +00:00
Jakob Borg
7f5e236dd7 gui: Wait for config commit before setting ignores (ref #4095)
Given the saveConfig() is async, it might not have happened before we
try to save the ignores and unpause. Likewise must wait for saving
ignores before unpausing or the scan might start before ignores are on
disk.

Javsacript <3
2017-04-24 08:57:07 +09:00
Simon Frei
914b09fd1f lib/model: Create root directory for paused folders (fixes #4094)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4095
2017-04-23 23:50:56 +00:00
Jakob Borg
e9f05d138f lib/db, lib/model: Always use reasonable sized batches (fixes #2250, fixes #4112)
Harmonize how we use batches in the model, using ProtoSize() to judge
the actual weight of the entire batch instead of estimating. Use smaller
batches in the block map - I think we might have though that batch.Len()
in the leveldb was the batch size in bytes, but it's actually number of
operations.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4114
2017-04-22 14:23:33 +00:00
Jakob Borg
10894695c6 cmd/syncthing: Use a 10 second EWMA for CPU usage, refactor a little
We have it lying around so might as well use it instead of inventing our
own thing.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4111
2017-04-20 08:33:09 +00:00
Simon Frei
6b188ebcf3 lib/model: Mark initial scan as finished even if failed and refactor (fixes #4103)
The mechanism to disallow manual scans before the initial scan completed
(#3996) , had the side effect, that if the initial scan failed, no further
scans are allowed. So this marks the initial scan as finished regardless of
whether it succeeded or not.

There was also redundant code in rofolder and a pointless check for folder
health in scanSubsIfHealthy (happens in internalScanFolderSubdirs as well).
This also moves logging from folder.go to ro/rw-folder.go to include the
information about whether it is send-only or send-receive

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4104
2017-04-20 00:20:34 +00:00
Jakob Borg
57e3f9e64b vendor: Update golang.org/x/sys/unix 2017-04-15 10:31:55 +02:00
Jakob Borg
b5694ca788 Merge branch 'release' (omitting the revert)
* release:
  Revert "lib/model, gui: Allow creating and editing ignores of paused folders (fixes #3608)"
2017-04-15 09:49:32 +02:00
Jakob Borg
bcfd18ceb1 Revert "lib/model, gui: Allow creating and editing ignores of paused folders (fixes #3608)"
This reverts commit 25b314f5f1.
2017-04-15 09:38:23 +02:00
Jonathan Cross
f689512a3f gui: Reduce height of textarea in ignores modal
Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4102
2017-04-14 20:33:41 +00:00
Jakob Borg
dd1f7a5ab7 lib/connections: Allow negative ACL entries on devices (fixes #4096)
Prefix an entry with "!" to make it a negative entry. First match wins.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4097
2017-04-13 17:43:29 +00:00
Jakob Borg
d48e46a29c cmd/syncthing: Allow custom event subscriptions (fixes #1879)
This adds a parameter "events" to the /rest/events endpoint. It should
be a comma separated list of the events the consumer is interested in.
When not given it defaults to the current set of events, so it's
backwards compatible.

The API service then manages subscriptions, creating them as required
for each requested event mask. Old subscriptions are not "garbage
collected" - it's assumed that in normal usage the set of event
subscriptions will be small enough. Possibly lower than before, as we
will not set up the disk event subscription unless it's actually used.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4092
2017-04-13 17:14:34 +00:00
Jakob Borg
75460be98d Merge branch 'release'
* release:
  lib/protocol: Accept invalid files without blocks (fixes #4093)
2017-04-12 11:49:11 +02:00
Jakob Borg
ce0456b5ac lib/protocol: Accept invalid files without blocks (fixes #4093) 2017-04-12 11:48:27 +02:00
Jakob Borg
e3e028c988 lib/protocol: Accept invalid files without blocks (fixes #4093) 2017-04-12 11:28:12 +02:00
Jakob Borg
da34f27546 gui, lib/config, lib/model: Allow absolute values for minimum disk free space (fixes #3307)
This deprecates the current minDiskFreePct setting and introduces
minDiskFree. The latter is, in it's serialized form, a string with a
unit. We accept percentages ("2.35%") and absolute values ("250 k", "12.5
Gi"). Common suffixes are understood. The config editor lets the user
enter the string, and validates it.

We still default to "1 %", but the user can change that to an absolute
value at will.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4087
LGTM: AudriusButkevicius, imsodin
2017-04-12 09:01:19 +00:00
Jakob Borg
c205fdd77e cmd/syncthing: Handle pre-releases with zero auto upgrade interval (fixes #4090) 2017-04-10 15:56:52 +02:00
Jakob Borg
ae4206f362 gui: Add forgotten translation string 2017-04-07 09:16:55 +02:00
Keith Turner
391665e322 readme: Use logo as header
Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4088
2017-04-07 05:21:11 +00:00
Simon Frei
5521759b23 lib/model: TestIgnores: Add ms sleep on all platforms (ref #3986 #3996)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4083
2017-04-06 09:55:54 +00:00
Jakob Borg
f0492c4eb3 gui: Per remote device transfer rates should follow setting (fixes #4082) 2017-04-06 10:42:45 +02:00
Jakob Borg
b1edf12257 gui, man: Update docs & translations 2017-04-05 17:10:31 +02:00
Jakob Borg
2579e8f715 build: Use tildes in Debian package versioning
Makes their version sorting closer to the semver we expect.
2017-04-05 16:59:37 +02:00
Jakob Borg
a1bcc15458 vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
2017-04-05 14:34:41 +00:00
Jakob Borg
49c1527724 vendor: Update github.com/calmh/du (ref #4079) 2017-04-04 14:53:24 +02:00
Jakob Borg
da35820fd5 lib/model: Work around Mac filesystem precision in TestIgnores (ref #3996) 2017-04-03 15:47:23 +02:00
Adam Piggott
79eac61b09 gui: Re-word introducer text (fixes #1819)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3831
2017-04-01 11:06:13 +00:00
Jakob Borg
2ff08e6c84 lib/sync: Make some tests not depend on real clock
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4065
2017-04-01 11:03:11 +00:00
Simon Frei
25b314f5f1 lib/model, gui: Allow creating and editing ignores of paused folders (fixes #3608)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3996
LGTM: calmh, AudriusButkevicius
2017-04-01 09:58:06 +00:00