Audrius Butkevicius
57fc0eb5b1
Make sure we start scanning at an indexed location ( fixes #1399 )
2015-03-08 19:45:47 +00:00
Lode Hoste
758233f001
Do not error when chmod failes when permissions are ignored ( fixes #1404 ).
2015-03-07 21:38:16 +01:00
Audrius Butkevicius
bf3e249237
Add GlobalDirectoryTree benchmarks
2015-03-04 23:39:33 +00:00
Audrius Butkevicius
fb649e9525
Fix benchmarks, cleanup tests
2015-03-04 23:39:32 +00:00
Audrius Butkevicius
9d1e2d9f46
Add /rest/tree API call
2015-03-04 23:39:27 +00:00
Audrius Butkevicius
9876d93b60
Fix tests on Windows while running as a simple user
2015-03-04 22:39:33 +00:00
Jakob Borg
44d0da02d0
Ensure progress when delete-by-rename fails ( fixes #1373 )
2015-03-01 10:55:48 +01:00
Jakob Borg
c25107eff3
Handle weird Lstat() returns for disappeared items (ref #1373 )
2015-03-01 10:55:43 +01:00
Jakob Borg
e7dbb8ccdc
Fix test for unknown flags
2015-02-15 09:51:39 +01:00
Karol Różycki
ec160f1f0a
Button to rescan all folders, fixes #1151
2015-02-12 21:03:35 +01:00
Jakob Borg
6bbd74adcd
Merge pull request #1321 from AudriusButkevicius/bitcheck
...
Refuse files with unknown bits set (fixes #1276 )
2015-02-10 20:27:14 +01:00
Audrius Butkevicius
b87ed97402
Refuse files with unknown bits set ( fixes #1276 )
2015-02-09 23:32:33 +00:00
Jakob Borg
a73a011ee0
Merge pull request #1323 from AudriusButkevicius/finished
...
Add ItemFinished event (fixes #1258 )
2015-02-09 15:24:10 +01:00
Jakob Borg
5d9a41f712
Merge pull request #1319 from AudriusButkevicius/renames
...
Fix issues with renames
2015-02-09 15:14:47 +01:00
Audrius Butkevicius
38eaefcabd
Add ItemFinished event ( fixes #1258 )
2015-02-01 18:59:29 +00:00
Audrius Butkevicius
380d5dfa6d
Remove fd cache (ref #1308 )
2015-02-01 18:59:24 +00:00
Audrius Butkevicius
32af626630
Fix issues with renames ( fixes #1302 )
...
Extra comments explain current issues.
2015-02-01 18:58:27 +00:00
Jakob Borg
2c8b627008
Integer type policy
...
Integers are for numbers, enabling arithmetic like subtractions and for
loops without getting shot in the foot. Unsigneds are for bitfields.
- "int" for numbers that will always be laughably smaller than four
billion, and where we don't care about the serialization format.
- "int32" for numbers that will always be laughably smaller than four
billion, and will be serialized to four bytes.
- "int64" for numbers that may approach four billion or will be
serialized to eight bytes.
- "uint32" and "uint64" for bitfields, depending on required number of
bits and serialization format. Likewise "uint8" and "uint16", although
rare in this project since they don't exist in XDR.
- "int8", "int16" and plain "uint" are almost never useful.
2015-01-19 10:34:36 -08:00
Jakob Borg
221e3eddd5
Remove leveldb panic workaround
...
Haven't seen this triggered for a long time...
2015-01-19 10:23:00 -08:00
Jakob Borg
74c39c677b
Actually remove test file after test run
2015-01-19 10:23:00 -08:00
Audrius Butkevicius
cba38b15a9
Check for deleted files
2015-01-18 13:44:10 +00:00
Jakob Borg
53cd289b90
Verify folder<->device permission in Request
...
Requests from valid devices for valid folders should be rejected if the
folder is not shared with that device.
2015-01-16 12:50:51 +01:00
Audrius Butkevicius
74d7c8e625
Efficient renames ( fixes #1217 )
2015-01-13 22:06:13 +00:00
Jakob Borg
eef1aebe8c
Refactor out protocol and luhn (protocol dependency) packages
2015-01-13 13:22:56 +01:00
Jakob Borg
e6c9baf6ef
Rename db.Set to db.FileSet
2015-01-12 20:57:39 +01:00
Jakob Borg
8d6db7be31
Rename package internal/files to internal/db
2015-01-12 20:57:22 +01:00
Jakob Borg
571cf7d490
Merge pull request #1182 from AudriusButkevicius/autoauto
...
Connecting to a newer node triggers autoupgrade check (fixes #1177 )
2015-01-11 09:16:12 +01:00
Audrius Butkevicius
5034a41c08
Connecting to a newer node triggers autoupgrade check ( fixes #1177 )
2015-01-10 17:05:19 +00:00
Jakob Borg
219ef996f5
Merge pull request #1226 from syncthing/deregister-fix
...
All roads lead to Finisher (fixes #1201 )
2015-01-10 17:53:01 +01:00
Audrius Butkevicius
5827a686b8
Make parallel hasher configurable, remove finisher setting ( fixes #1199 )
2015-01-10 14:32:20 +00:00
Audrius Butkevicius
dec479532e
All roads lead to Finisher ( fixes #1201 )
2015-01-10 13:45:48 +00:00
Jakob Borg
d46ce5003c
Implement GetGlobalTruncated
2015-01-09 08:41:02 +01:00
Jakob Borg
4c4143d9be
Move FileInfoTruncated to files package
...
This is where it's used, and it clarifies that it's never used over the
wire.
2015-01-09 08:28:24 +01:00
Jakob Borg
8bc7d259f4
Move FileIntf to files package, expose Iterator type
...
This is where FileIntf is used, so it should be defined here (it's not
a protocol thing, really).
2015-01-09 08:18:42 +01:00
Audrius Butkevicius
9d6ef24660
Merge pull request #1194 from syncthing/fix-1186
...
Use comma-ok idiom to signal files missing in database (fixes #1186 )
2015-01-06 21:54:13 +00:00
Brendan Long
7a9fc6dbd3
Don't use Go 1.4 range syntax in queue_test.go, since the listed requirement is Go 1.3.
2015-01-06 15:45:58 -06:00
Jakob Borg
75d0dc251e
Use comma-ok idiom to signal files missing in database ( fixes #1186 )
...
Prevents us from doing stupid things to the folder root (empty file
path) when nodes disconnect...
2015-01-06 22:40:20 +01:00
Audrius Butkevicius
5ac01a3af4
Hash blocks after receipt, try multiple peers ( fixes #1166 )
2015-01-03 23:21:57 +00:00
Audrius Butkevicius
56ccb5b2ab
New device, folder prompts ( fixes #120 , fixes #330 )
2015-01-03 23:06:41 +00:00
Audrius Butkevicius
9c6cb0f630
Merge pull request #1172 from syncthing/random-scanintv
...
Add a random perturbation to the scan interval (fixes #1150 )
2015-01-02 15:25:22 +00:00
Jakob Borg
54c3caad53
Add a random perturbation to the scan interval ( fixes #1150 )
2015-01-02 16:16:16 +01:00
Jakob Borg
9b5e8aaf83
Repair buggy BringToFront
2015-01-02 15:54:04 +01:00
Jakob Borg
5143c09bcf
Refactor / cleanup
2015-01-02 15:54:04 +01:00
Jakob Borg
2496185629
Only buffer file names, not full &FileInfo
2015-01-02 15:33:39 +01:00
Jakob Borg
34deb82aea
Use slice instead of list, no map
...
benchmark old ns/op new ns/op delta
BenchmarkJobQueueBump 345 154498 +44682.03%
BenchmarkJobQueuePushPopDone10k 9437373 3258204 -65.48%
benchmark old allocs new allocs delta
BenchmarkJobQueueBump 0 0 +0.00%
BenchmarkJobQueuePushPopDone10k 10565 22 -99.79%
benchmark old bytes new bytes delta
BenchmarkJobQueueBump 0 0 +0.00%
BenchmarkJobQueuePushPopDone10k 1452498 385869 -73.43%
2015-01-02 15:33:39 +01:00
Jakob Borg
8f72ae9da2
Add some benchmarks
2015-01-02 15:33:39 +01:00
Audrius Butkevicius
b753f01ac1
Add tests
2015-01-02 15:33:39 +01:00
Audrius Butkevicius
fd0a147ae6
Add job queue ( fixes #629 )
...
Request to terminate currently ongoing downloads and jump to the bumped file
incoming in 3, 2, 1.
Also, has a slightly strange effect where we pop a job off the queue, but
the copyChannel is still busy and blocks, though it gets moved to the
progress slice in the jobqueue, and looks like it's in progress which it isn't
as it's waiting to be picked up from the copyChan.
As a result, the progress emitter doesn't register on the task, and hence the file
doesn't have a progress bar, but cannot be replaced by a bump.
I guess I can fix progress bar issue by moving the progressEmiter.Register just
before passing the file to the copyChan, but then we are back to the initial
problem of a file with a progress bar, but no progress happening as it's stuck
on write to copyChan
I checked if there is a way to check for channel writeability (before popping)
but got struck by lightning just for bringing the idea up in #go-nuts.
My ideal scenario would be to check if copyChan is writeable, pop job from the
queue and shove it down handleFile. This way jobs would stay in the queue while
they cannot be handled, meaning that the `Bump` could bring your file up higher.
2015-01-02 15:33:39 +01:00
Jakob Borg
ce4b897d0e
Handle read only temp files after crash/restart
2014-12-31 13:06:28 +01:00
Jakob Borg
22f39be197
Exit before attempting to use nil variables on scanning nonexistent folder
2014-12-23 14:14:05 +01:00
Jakob Borg
cadbb6bbce
Move ignore handling from index recv to puller ( fixes #1133 )
...
With this change we accept updates for ignored files from other devices,
and check the ignore patterns at pull time. When we detect that the
ignore patterns have changed we do a full check of files that we might
now need to pull.
2014-12-23 10:46:02 +01:00
Jakob Borg
2c89f04be7
Refactor ignore handling (...)
...
This uses persistent Matcher objects that can reload their content and
provide a hash string that can be used to check if it's changed. The
cache is local to each Matcher object instead of kept globally.
2014-12-23 10:46:02 +01:00
Jakob Borg
618a8682b7
golint style tweaks
2014-12-16 23:33:56 +01:00
Jakob Borg
d452b7593f
Merge branch 'pr-1094'
...
* pr-1094:
GUI tweaks for last file synced
Display last received file and time (fixes #292 , fixes #801 )
2014-12-12 14:25:12 +01:00
Audrius Butkevicius
7a1aaaf5c4
Remove temporaries during scan ( fixes #1092 )
2014-12-09 23:58:58 +00:00
Audrius Butkevicius
bde92d5cfe
Display last received file and time ( fixes #292 , fixes #801 )
2014-12-09 20:24:48 +00:00
Jakob Borg
febeed3277
config.ConfigWrapper -> config.Wrapper
2014-12-08 16:39:11 +01:00
Jakob Borg
9d07aa006d
Various style fixes
2014-12-08 16:36:15 +01:00
Jakob Borg
12d69e25dd
Fixes for go vet
2014-12-08 16:19:08 +01:00
Jakob Borg
c9492e54f7
Copyright notice
2014-12-08 15:42:53 +01:00
Audrius Butkevicius
a9339d0627
Revert "Cache file descriptors" ( fixes #1096 )
...
This reverts commit 992ad97ad5
.
Causes issues on Windows which uses file locking.
Meaning we cannot archive or modify the file while it's open.
2014-12-08 11:56:14 +00:00
Audrius Butkevicius
b00264b594
Copy compression setting while introducing
2014-12-07 22:43:30 +00:00
Jakob Borg
581f4b89bd
Merge remote-tracking branch 'origin/pr/977'
...
* origin/pr/977:
Cache file descriptors
2014-12-07 08:03:34 +01:00
Audrius Butkevicius
604a4e7dbc
Scrap IsSymlink for native support on Go 1.4
...
Obviously needs Go 1.4 to go back in.
I am still open to doing fix-up's on rescan interval on Windows, which
would still allow getting rid of all the Windows code.
Frankly, we could just defer creations of links (like we defer deletions of files)
in hopes that the target gets created, and if it doesn't, well tough luck, you'll
get a file symlink.
To be honest, nobody would even notice this 'issue' as I am sure nobody on
Windows uses symlinks.
But at the same time, this ugly code is hidden away in some creppy file in
it's own module far far away, and the interface that it exports is fine'ish,
so I wouldn't mind keeping it as it is.
2014-12-04 23:02:57 +00:00
Jakob Borg
7f97037190
Revert "Merge pull request #1078 from syncthing/go1.4"
...
This reverts commit b658afd857
, reversing
changes made to 591c5dabf4
.
2014-12-04 22:24:49 +01:00
Audrius Butkevicius
992ad97ad5
Cache file descriptors
2014-12-04 16:18:47 +00:00
Jakob Borg
2abe792f36
Use same order of parameters as os.Symlink
2014-12-04 11:53:55 +01:00
Jakob Borg
e7441ff6e8
DisableSymlinks -> !SymlinksEnabled
2014-12-01 11:27:07 +01:00
Audrius Butkevicius
7ad711f554
Add option to disable symlinks ( fixes #1017 )
2014-11-30 22:10:32 +00:00
Audrius Butkevicius
fd2d2c035e
Add support for multiple announce servers ( fixes #677 )
...
Somebody owes me a beer.
2014-11-30 13:25:06 +01:00
Jakob Borg
90de5659ea
Data race: sharedPullerState WriteAt+Close
2014-11-29 23:51:53 +01:00
Jakob Borg
42b8dafafe
Data race: can't access sharedPullerState.closed from the outside
2014-11-29 23:18:56 +01:00
Jakob Borg
07cdf0364c
Data race: ProgressEmitter (debug output only)
2014-11-29 22:51:13 +01:00
Jakob Borg
7f829f0159
Data race: broken locking on model.folderIgnores
2014-11-29 22:38:08 +01:00
Jakob Borg
a918aa97d9
Data race: deviceActivity methods with value receiver :(
2014-11-29 22:38:08 +01:00
Audrius Butkevicius
ea17542e4b
Change progress emitter
...
1. Do not use cached value for BytesCompleted
2. Refactor JS a bit
3. Allow disabling progress emitter
2014-11-25 22:07:18 +00:00
piobpl
90a31589bb
Showing detailed sync progress ( fixes #476 )
...
based on commit by Audrius Butkevicius <audrius.butkevicius@gmail.com>
2014-11-25 20:18:35 +01:00
Audrius Butkevicius
262cf63956
Populate correct defaults
2014-11-23 18:45:45 +00:00
Jakob Borg
fe2ae4c6c3
Merge pull request #997 from syncthing/lig
...
Minor fixes
2014-11-23 11:35:19 +01:00
Jakob Borg
16d9944dbb
Merge pull request #1002 from AudriusButkevicius/routine-cfg
...
Make copiers, pullers and finishers configurable
2014-11-23 11:29:58 +01:00
Audrius Butkevicius
59a85c1d75
Use custom structure for /need calls ( fixes #1001 )
...
Also, remove trimming by number of blocks as this no longer affects the size
of the response.
2014-11-23 00:52:48 +00:00
Audrius Butkevicius
4427149a38
Make copiers, pullers and finishers configurable
...
Compliments #999
2014-11-23 00:02:12 +00:00
Audrius Butkevicius
20dee618ea
Populate ignores upon adding a folder ( fixes #996 )
2014-11-22 02:22:09 +00:00
Audrius Butkevicius
37ebbb53be
Replace directories/links with files ( fixes #580 )
2014-11-22 02:22:03 +00:00
Jakob Borg
ce948fc512
Don't leave read only dir around, fails clean
2014-11-20 23:34:14 +01:00
Audrius Butkevicius
c325ffd0f8
Add symlink support ( fixes #873 )
2014-11-20 16:32:00 +01:00
Audrius Butkevicius
938e287501
Code smell
2014-11-20 16:32:00 +01:00
Jakob Borg
82c6caef85
Use more inclusive copyright header
2014-11-17 12:54:42 +01:00
Audrius Butkevicius
7106fc5304
Remove existing file while handling dir ( fixes #952 )
2014-11-13 22:59:40 +00:00
Audrius Butkevicius
d16dcb9f19
Lock while accessing folder configs
2014-11-13 22:30:49 +00:00
Audrius Butkevicius
1aaf34b0ed
Fix typo
2014-11-13 22:30:43 +00:00
Audrius Butkevicius
39a3b8922d
Save config on device rename ( fixes #957 )
2014-11-12 23:42:17 +00:00
Emil Hessman
2592ba7399
internal/model: fix formatting directive in test
2014-11-12 12:32:25 +01:00
Jakob Borg
c959f59581
Quick and dirty fix for Ignores test failures
2014-11-09 22:20:20 +01:00
Jakob Borg
2449723a1c
Add list of compiled regexps to /rest/ignores ( fixes #942 )
2014-11-08 22:13:12 +01:00
Jakob Borg
8449a65cdf
Merge pull request #930 from AudriusButkevicius/avail
...
Only connected devices are available devices
2014-11-03 21:56:40 -06:00
Audrius Butkevicius
fc47562983
Only connected devices are available devices
2014-11-03 21:25:36 +00:00
Audrius Butkevicius
76900ae291
Fix and relax locking
2014-11-03 21:14:57 +00:00
Audrius Butkevicius
9ea8b6f659
Do not delete temp files on error ( fixes #849 )
2014-11-01 23:33:49 +00:00
Audrius Butkevicius
d305752749
Cleanup temporary files during directory removal ( fixes #919 )
2014-10-29 11:19:48 +00:00