Jakob Borg
5c067661f4
lib/model: Consistently show folder description in startup messages
...
Since we anyway need the folderConfig for this I'm skipping the copying
of all it's attributes that rwfolder did and just keeping the original
around instead.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3825
2016-12-21 11:23:20 +00:00
Jakob Borg
226da976dc
lib/model: Allow empty subdirs in scan request ( fixes #3829 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3833
2016-12-21 10:33:07 +00:00
Jakob Borg
2f770f8bfb
lib/config, lib/protocol: Improve folder description with empty label
2016-12-19 10:12:06 +01:00
Jakob Borg
f67c5a2fd6
lib/model: Don't send symlinks to old devices that can't handle them ( fixes #3802 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3811
2016-12-17 19:48:33 +00:00
Heiko Zuerker
398c356f22
lib/model: Clarify master terminology ( fixes #2679 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3793
2016-12-16 22:23:35 +00:00
Audrius Butkevicius
542b76f687
lib/model: Moar sleep
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3807
2016-12-16 12:05:27 +00:00
Jakob Borg
abb8a1914a
lib/model: Accept scan requests of paths ending in slash ( fixes #3804 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3805
2016-12-16 11:21:22 +00:00
Audrius Butkevicius
0582836820
lib/model, lib/scanner: Efficient inserts/deletes in the middle of the file
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3527
2016-12-14 23:30:29 +00:00
Jakob Borg
3582783972
lib/model, lib/osutil: Verify target directory before pulling / requesting
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3798
2016-12-13 10:24:10 +00:00
Jakob Borg
5070d52f2f
lib/model: Add benchmark for model.Request()
2016-12-09 23:14:56 +01:00
Jakob Borg
7b07ed6580
lib/model, lib/protocol, lib/scanner: Include symlink target in index, pull symlinks synchronously
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3792
2016-12-09 18:02:18 +00:00
Lars K.W. Gohlke
8ce9b026e9
lib/model: Minor cleanups
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3765
2016-12-06 08:54:04 +00:00
Jakob Borg
e3cf718998
lib/ignore: Add central check for internal files, used in scanning, pulling and requests
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3779
2016-12-01 14:00:11 +00:00
Jakob Borg
63194a37f6
lib/model: Double check results in filepath.Join where needed
...
Wherever we have untrusted relative paths, make sure they are not
escaping their folder root.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3776
2016-12-01 12:35:11 +00:00
Unrud
cabe94552a
lib/model: Prevent collisions in the progressemitter registry
...
Using filepath.Join can cause collisions. The folder ID could be something
like ".." or "../..".
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3778
2016-12-01 12:34:20 +00:00
Jakob Borg
48a229a0cd
lib/model: Temp names from all platforms should be recognized as such
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3777
LGTM: AudriusButkevicius
2016-11-30 21:23:24 +00:00
Jakob Borg
e4db86836b
lib/model: Locking in the request test
2016-11-30 13:11:06 +01:00
Jakob Borg
913a85c571
lib/model: Add simple file syncing test
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3772
2016-11-30 09:32:28 +00:00
Jakob Borg
ed4f6fc4b3
lib/connections, lib/model: Connection service should expose a single interface
...
Makes testing easier, which we'll need
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3771
2016-11-30 07:54:20 +00:00
Jakob Borg
91568a173a
lib/model: Remove ineffectual assignment in test
2016-11-24 11:33:27 +01:00
Jakob Borg
8559e20237
lib/osutil: Don't chmod in atomic file creation ( fixes #2472 )
...
Instead, trust (and test) that the temp file has appropriate permissions
from the start. The only place where this changes our behavior is for
ignores which go from 0644 to 0600. I'm OK with that.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3756
2016-11-23 14:06:08 +00:00
Jakob Borg
26730eb083
lib/model: Fix test that relies on ignore reloading
2016-11-23 14:42:29 +01:00
Simon Frei
4160ce674d
model: consistently use cfg when referring to config instance and not package
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3755
2016-11-22 23:14:20 +00:00
Jakob Borg
cc9a9fb390
lib/model, lib/protocol: Add Folder.Description() for logging (ref #3741 )
2016-11-22 08:36:14 +01:00
Roman Zaynetdinov
d3a251e6d9
lib/model: Log folder IDs and labels ( fixes #3724 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3741
2016-11-21 20:09:18 +01:00
Unrud
1574b7d834
lib/model: Add fsync of files and directories, option to disable ( fixes #3711 )
2016-11-21 18:09:51 +01:00
Jakob Borg
a8a0bc356a
lib/model: Minor cleanup to not fondle cfg.Raw things in handleDeintroductions
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3739
2016-11-17 08:56:55 +00:00
Jakob Borg
faee1d5a8d
lib/model: Fix locking around introduction handling ( fixes #3737 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3738
2016-11-17 08:50:24 +00:00
Jakob Borg
3088dac33b
lib/model: Clean up generateClusterConfig, fix spurious test failure by sorting
2016-11-17 07:45:45 +01:00
Audrius Butkevicius
f60b424d70
lib/config: Raw() -> RawCopy()
2016-11-13 09:29:35 +01:00
Audrius Butkevicius
a1a91d5ef4
lib/model: Introducer can remove stuff it introduced ( fixes #1015 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3522
2016-11-13 09:29:33 +01:00
Jakob Borg
59f3d1445f
Revert "lib/model: Introducer can remove stuff it introduced ( fixes #1015 )"
...
This reverts commit 0b88cf1d03
.
2016-11-12 08:38:29 +01:00
Audrius Butkevicius
0b88cf1d03
lib/model: Introducer can remove stuff it introduced ( fixes #1015 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3522
2016-11-11 15:54:25 +01:00
Jakob Borg
ae4cc94a9d
lib/model: Fix locking order in Availability() ( fixes #3634 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3714
2016-11-08 06:38:50 +00:00
Jakob Borg
3f9b75b7b3
Revert "lib/model: Introducer can remove stuff it introduced ( fixes #1015 )"
...
This reverts commit ec2b097313
.
2016-11-08 14:27:32 +08:00
Audrius Butkevicius
ec2b097313
lib/model: Introducer can remove stuff it introduced ( fixes #1015 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3522
2016-11-08 00:40:48 +08:00
Audrius Butkevicius
3418497f3d
lib/sync: Log everything...
2016-11-03 21:33:33 +00:00
Audrius Butkevicius
7fba8cf759
lib/sync: Print all lockers, add holder to RWMutex
2016-10-30 00:17:25 +01:00
Jakob Borg
0296c23685
lib/protocol: Use DeviceID in protocol messages, with custom marshalling
...
This makes the device ID a real type that can be used in the protobuf
schema. That avoids the juggling back and forth from []byte in a bunch
of places and simplifies the code.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3695
2016-10-29 21:56:24 +00:00
MikeLund
74dd051d51
all: Update docs.s.n links to use https
...
Skip-check: authors
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3691
2016-10-27 17:02:19 +00:00
Audrius Butkevicius
815588daba
lib/sync, lib/model: Capture locker routine ID, print locker details on deadlock
2016-10-18 21:00:01 +01:00
Jakob Borg
4e8c8d7e2c
cmd/syncthing, lib/db, lib/model: Track more detailed file/dirs/links/deleted counts
2016-10-17 23:57:43 +02:00
Jakob Borg
b8a90b7eaa
lib/model: Remove chatty delta index confirmation
...
This had its moment when making sure it worked initially, but nowadays
there is not point discussing the obvious on every folder on every
connect.
2016-10-17 09:21:58 +02:00
Nathan Morrison
d322ebd0b9
Add API service for local disk changes
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3626
LGTM: calmh, AudriusButkevicius
2016-09-28 15:54:13 +00:00
Jakob Borg
da0b7cc7f2
lib/model: Correct lock taking order in ConnectionStats ( fixes #3596 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3597
2016-09-14 19:38:55 +00:00
Jakob Borg
46a143e80e
lib/model: Handle deleted-then-ignored files ( fixes #3502 )
...
When files that were previously marked as deleted became ignored, we
used to do nothing at all. This changes that behavior to set the Invalid
bit (that we should rename to Ignored). This then becomes an update to
other devices that they should not trust our knowledge about the file in
question.
Read this diff without whitespace...
Tested by
- creating a bunch of files on s1
- letting them sync to s2
- shutting down s2
- deleting the files on s1 and rescanning
- adding the files to .stignore on s1 and rescanning
- starting up s2 and letting it sync
- observing the files are not deleted on s2, and it considers itself up
to date.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3557
2016-09-02 13:23:24 +00:00
Jakob Borg
69b7f26e4c
lib/model, cmd/syncthing: Also account for deleted files in folder summary events (ref #3496 )
...
This should probably be reflected in the GUI somewhere as well...
2016-09-02 10:45:39 +02:00
Jakob Borg
5b37d0356c
lib/model, gui: Correct completion percentages when there are lots of deletes ( fixes #3496 )
...
We used to consider deleted files & directories 128 bytes large. After
the delta indexes change a bug slipped in where deleted files would be
weighted according to their old non-deleted size. Both ways are
incorrect (but the latest change made it worse), as if there are more
files deleted than remaining data in the repo the needSize can be
greater than the globalSize, resulting in a negative completion
percentage.
This change makes it so that deleted items are zero bytes large, which
makes more sense. Instead we expose the number of files that we need to
delete as a separate field in the Completion() result, and hack the
percentage down to 95% complete if it was 100% complete but we need to
delete files. This latter part is sort of ugly, but necessary to give
the user some sort of feedback.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3556
2016-09-02 06:45:46 +00:00
Jakob Borg
0b1475169f
lib/model: Correct virtual mtime handling ( fixes #3516 )
...
We previously set the mtime on the temp file, and then renamed it to the
real path. Unfortunately that means we'd save the real timestamp under
the under the temp name ".syncthing.foo.tmp" when the actual file that
we will look up on the next scan is "foo". This moves the Chtimes later,
ensuring that it gets recorded correctly under the right name.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3519
2016-08-16 18:22:19 +00:00
Audrius Butkevicius
6ec4fbc82b
lib/model: Add minumum interval for progress emitter ( fixes #3517 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3518
2016-08-16 18:22:01 +00:00