Commit Graph
64 Commits
Author SHA1 Message Date
Christian Kamm 40f44c2389 DB: Delete corrupt database. #2547
* Also use readonly DB access for SocketAPI.
2014-12-04 15:35:55 +01:00
Christian Kamm dc2f0d59cb FolderWizard: Clean up naming of 'add folder' button. #2371 2014-12-04 10:47:26 +01:00
Christian Kamm 4dcfacf2d5 Fix compile. :/ 2014-12-04 09:59:24 +01:00
Christian Kamm b7485106ef NetworkJobs: Set timeout to 5 minutes everywhere. 2014-12-04 09:54:17 +01:00
Christian Kamm f82893496b Fix typo. 2014-12-04 09:54:15 +01:00
Christian Kamm c418e58f88 Etag job scheduling: Silence warnings, make prettier. 2014-12-04 09:52:13 +01:00
Christian Kamm b7d7f424c5 FolderMan: only touch _currentSyncFolder when done #2407
Also simplity terminateSyncProcess() to always terminate the
*current* sync run. Only one can be running at a time anyway.
2014-12-03 13:46:37 +01:00
Christian Kamm e3b07f569a FolderWatcherTest: Use Utility::usleep. 2014-11-21 08:21:36 +01:00
Christian Kamm 3e3ca14b4c Print ssl library version only on Qt >=5.0.0. 2014-11-20 13:46:44 +01:00
Christian Kamm d4e0941c27 Windows filewatcher: switch to ReadDirectoryChangesW.
Based on danimo's #2454 fix for #2455 and related to #2297.
2014-11-20 12:36:17 +01:00
Christian Kamm 9dc57359b9 csync db files: Hide after some commit/transactions. #2461
The shm and wal files are only created later.
2014-11-20 12:30:04 +01:00
Christian Kamm 421a8cc6b7 Windows: Make unit tests compile. 2014-11-19 14:18:37 +01:00
Christian Kamm 3a448fda91 Windows mingw32: Fix finding of windres binary. 2014-11-19 14:16:56 +01:00
Christian Kamm 5c9564ac08 Add to 1.7 changelog. 2014-11-06 15:31:09 +01:00
Christian Kamm 174e1acbc7 Folder::wipe(): Remove partial downloads and -shm,-wal db files. 2014-11-06 12:49:02 +01:00
Christian Kamm 1f09a24a72 Resync button: Remove partial downloads too. #2445 2014-11-06 12:17:04 +01:00
Christian Kamm eed91ddf46 Legacy propagator: Don't use mtime retrieved via _fstat64.
May be the cause of #2431
2014-11-06 12:16:55 +01:00
Christian Kamm a49a6bfd88 Logging: Report setModTime failures.
Ths may be helpful for #2252 and maybe even #2431.
2014-11-05 13:20:19 +01:00
Christian Kamm b87931c0a9 Logging: Print etags, not just result of comparison. 2014-11-05 13:08:53 +01:00
Christian Kamm 9b640d586b Wizard: Fix local folder warning in advanced setup wizard. #2362
The _oldLocalFolder should always be the previously configured
folder, not the one that was most recently chosen on the wizard
page.
2014-11-05 12:10:41 +01:00
Christian Kamm 7440ffc0e6 Download: Fix data loss when rename fails. #2428 2014-11-05 11:00:46 +01:00
Christian Kamm 45eeb5065f Download: Avoid overwriting file with case conflict. #1914 2014-10-30 09:06:53 +01:00
Christian Kamm 1c4072e231 Selective sync ui: Fix #2390 2014-10-24 16:11:29 +02:00
Christian Kamm fce76a13cb Sync scheduling: Only do a follow-up sync 3 times. #2355
After trying again immediately for 3 times, no more fast follow-ups
are run until a sync finishes without needing a fast follow-up.
2014-10-24 13:31:48 +02:00
Christian Kamm 82b14370fc Sync scheduling: Only retry up to twice after fail. #2386
Previously when a sync failed, we'd retry very soon (30s) no matter how
often a sync had failed before. After this change we'll retry twice and
then back off to the regular 5min interval.
2014-10-24 13:31:48 +02:00
Christian Kamm c0ea69ee24 SqlQuery: Reset after each successful exec().
In e5269a4151 I moved the reset calls to
before the first bindValue() because we didn't consistently reset()
after exec().

However, some queries may keep a lock on the database so it is necessary
to reset() as soon as the data is read. This commit reintroduces these
reset() calls.
2014-10-24 10:11:00 +02:00
Christian Kamm 5640cbf653 SqlDatabase: Make it non-copyable. 2014-10-24 09:56:30 +02:00
Christian Kamm e5269a4151 Add SyncJournalDB autotests.
There also was a bug in syncjournaldb: in some error conditions the
sql query wasn't reset properly. We now always reset a query before
calling bindValue.
2014-10-23 15:15:47 +02:00
Christian Kamm d77fcea365 Csync tests: Don't use sqlite3_close_v2. 2014-10-22 12:44:33 +02:00
Christian Kamm ba86988101 Csync tests: Fix broken tests.
It is no longer ok to call csync_statedb_load() on a non-existant
database since it opens readonly only.
2014-10-22 12:22:13 +02:00
Christian Kamm de48e65091 Csync tests: Fix compile. 2014-10-22 11:45:48 +02:00
Christian Kamm 3149cd03be Sync scheduling: Never enqueue a folder while it is synced.
Issues: #2268, #2275
2014-10-09 15:55:10 +02:00
Christian Kamm 5314765410 fix compile 2014-10-09 15:55:10 +02:00
Christian Kamm dfba8fbe5e CheckServerJob: Require status code 200. #2290 2014-10-09 11:06:00 +02:00
Christian Kamm 886f9d82f2 Sync scheduling: Improve logging. #2275 2014-10-09 09:01:35 +02:00
Christian Kamm 705cd571a5 Download: Don't store message body if status != 2xx #2280 2014-10-08 14:18:29 +02:00
Christian Kamm 48d3c75745 GET: Retry if bad range header used. #2280
* If a 416 is returned and we used a Range header, try again
  from scratch.
* The direct URL logic was also inconsistent for resumed downloads:
  it sent the Range header but didn't check the returned
  Content-Range header correctly. Now resuming is disabled for
  direct URL downloads.
2014-10-08 14:18:29 +02:00
Christian Kamm 285cb78962 Sync scheduling: Don't always force-sync. #2268
If lastEtag was null, a force sync was triggered. Force syncs
don't update the etag. The etag retrieval job would only run if
lastEtag was not null. So it could never become non-null.
2014-10-08 10:51:32 +02:00
Christian Kamm 708655d9b2 fix incomplete rename
from 9bd7ffe952
2014-10-08 09:36:47 +02:00
Christian Kamm 9bd7ffe952 blacklist: Fix stale blacklist removal. #2247
Use the right check to determine whether a file has a blacklist entry,
SyncFileItem::FileIgnored was incorrect because that denotes files from
the ignore list or blacklisted files with no retries left.

The blacklistedInDb flag does the right thing. Rename it to
hasBlacklistEntry to be more explicit.
2014-10-08 09:17:40 +02:00
Christian Kamm fa881ba1c7 Notifications: Don't emit one per error. #1777 2014-09-19 15:59:03 +02:00
Christian Kamm eb1b17e8e4 CSync tests: Add t1.cfg to gitignore. 2014-09-19 14:21:14 +02:00
Christian Kamm 2eec85a97c NetworkJobs: Propagator jobs keep others from expiring. #2155
In some owncloud server setups multiple concurrent connections for the
same session are not supported: owncloud/core#11153

This causes issues with multiple uploads and downloads. A usual symptom
is the quota job failing and the sync aborting.

This workaround lets activity on the propagator's GET and PUT jobs
reset the timeout of all network jobs. That way, queries like the quota
job would not time out while a large up/download is in progress.
2014-09-19 11:22:57 +02:00
Christian Kamm a88ac00115 SyncEngine: Better reporting when ignoring hardlinks. #2217
Also touch csync to actually let us know it's ignoring the file
due to it having hard links.
2014-09-18 11:32:29 +02:00
Christian Kamm 30683b38a8 Updater: Add "didn't check for updates" message. #2175
Don't show "Checking server..." when we are not.

(cherry picked from commit ece11dc3d8)
2014-09-18 09:43:13 +02:00
Christian Kamm 45aefeb146 SelectiveSyncDialog: Change 'partial' behavior.
The real bug in #2219 actually was that the gui allowed users to
choose to not sync the root folder. That's not supported and no
longer possible in the UI.

Instead you may now sync a folder's files without syncing its sub-
folders.
2014-09-18 09:42:50 +02:00
Christian Kamm 0bd73788f4 Doc: Update csync test script README. 2014-09-17 16:18:55 +02:00
Christian Kamm e395282e0e SelectiveSyncDialog: Fix sync-nothing case. #2219 2014-09-17 16:13:47 +02:00
Christian Kamm 1f129d0bcb Propagator: Don't upload files that were changed recently.
Instead skip them and try another sync later.

See #2167, #2169, #2210.
2014-09-17 15:30:18 +02:00
Christian Kamm c2ae5e5fd1 FolderMan: Ensure a 1s delay between sync request and start.
That way the propagator can detect files that are still being
changed right now and skip them.
2014-09-17 15:30:18 +02:00
Christian Kamm 99aa2cdf2a Log: Print client version on sync start. #2178 2014-09-17 09:39:04 +02:00
Christian Kamm 0eb9401c62 File change detection: Also look at file sizes.
See #2167 and #2169.

* csync_detect_update: Reupload a file if the sizes differ, similar
  to how we reupload if the mtimes differ.
* PropagateUploadFileQNAM::slotPutFinished(): Abort an upload if the
  size changed, similar to how we abort an upload if the mtimes changed.
2014-09-17 09:05:13 +02:00
Christian KammandOlivier Goffart 20dd3b0a69 FolderMan: Fix startFromScratch logic. #1989
(cherry picked from commit 4566ca3127)
2014-09-15 13:53:38 +02:00
Christian KammandOlivier Goffart f348eabf19 Account: Fix cert save/restore from settings. #2160
(cherry picked from commit cc1121ef00)
2014-09-15 13:53:38 +02:00
Christian Kamm 88b7f2e0ee SyncJournal: Don't use C++11 features. 2014-09-05 12:48:45 +02:00
Christian Kamm 2630a73a1c Propagator: Use csync to get the modification time.
See owncloud/core#9781
2014-09-04 14:16:23 +02:00
ckamm 4decd15ca9 Merge pull request #2161 from ckamm/stale-downloadinfo
Clean up stale journal entries and temporaries. #2057
2014-09-04 14:14:39 +02:00
ckamm 3a59dd24f3 Merge pull request #2162 from ckamm/error-missing-exclude
Don't do a broken sync when the system exclude file is missing
2014-09-04 14:14:07 +02:00
Christian Kamm 1cf1f6edcb Fix style issues. 2014-09-04 13:27:11 +02:00
Christian Kamm 5d36a27893 Clean up stale journal entries and temporaries. #2057
* Downloadinfo entries for files that no longer need to be downloaded
  are useless and can be removed. In particular, the temporary files
  holding partially retrieved files are now deleted when no longer
  necessary.
* The same is true for blacklist entries for paths that are no longer
  being discovered.
* Same for uploadinfos for files that no longer need to be uploaded.
2014-09-04 13:14:15 +02:00
Christian Kamm da94533647 Folders: Signout should not switch folders to paused state. #2112
On signout, syncs that are running in folders are aborted. That used to
also switch the state of these folders to 'paused'. To fix that, aborts
that are caused by user actions no longer change the folder paused
state.

Aborts due to errors should still pause folders! Otherwise we'd try
resyncing them even though there was an error.
2014-09-04 11:21:28 +02:00
Christian Kamm aef569ee9d SyncEngine: Use exclude file fallback next to binary on linux.
This is mainly useful for developers where the system-wide exclude file
may not exist.
2014-09-03 14:53:01 +02:00
Christian Kamm cf881aa6dc SyncEngine: Fix invalid slot name in sync error condition. 2014-09-03 14:52:55 +02:00
Christian Kamm a48bf3142c SyncEngine: Abort sync with error if system exclude file is missing.
Syncing without the system exclude file would cause lots of trouble.
For instance we would try uploading the temporary files we store
partially completed downloads in.
2014-09-03 14:52:46 +02:00