Commit Graph
100 Commits
Author SHA1 Message Date
Christian Kamm e381143a8f Ensure good sync state if in-progress folder is deleted. #2896
The slotFolderSyncFinished() didn't reliably trigger because
the folder was being deleted before the syncFinished signal could
fire.
2015-02-27 12:39:19 +01:00
Christian Kamm b03209ccef Inform user about ignored long files. #2882 2015-02-27 12:12:39 +01:00
Christian Kamm c8167b77c9 Remove mention of allprop #2865 2015-02-26 12:36:11 +01:00
Christian Kamm c37792f58f Propagator: Upload files with future timestamps. #2880 2015-02-26 11:00:06 +01:00
Christian Kamm 842e5ba5e0 Sharing: Fix for folders containing &. #2892 2015-02-26 09:58:09 +01:00
Christian Kamm 5c7fd24ea8 Handle 503 due to maintenance more gracefully. #2884 2015-02-25 12:02:10 +01:00
Christian Kamm 76ac628153 Discovery: Distinguish 503 Storage not available. #2884 2015-02-25 12:02:10 +01:00
Christian Kamm 6f71bd9353 SocketAPI: Don't mark .lnk files as ignored on windows. #2447 2015-02-25 11:55:48 +01:00
Christian Kamm f88398e776 lnk files: Fix exists() calls. #2792 2015-02-25 11:50:32 +01:00
Christian Kamm 08c33cd1dc Discovery: Fix handling of 503 on a folder. #2884 2015-02-25 08:09:07 +01:00
Christian Kamm 0464947610 Remove extra ; to silence warning. 2015-02-25 07:14:05 +01:00
Christian Kamm 40dbc78407 concatUrl: Remove manual parsing, add test. #2817 2015-02-13 14:53:55 +01:00
Christian Kamm a2aef04f21 ConValidator: Avoid a double auth check during startup. #2801 2015-02-12 15:25:44 +01:00
Christian Kamm 8f75434558 QuotaInfo: Ensure only one QuotaJob during startup. #2801 2015-02-12 15:25:44 +01:00
Christian Kamm 9ba88f6baf Windows: Sync .lnk files correctly. #2792 2015-02-12 11:27:58 +01:00
Christian Kamm e4fce1250b Progress: Ensure overall progress is between 0 and 100. #2648
This should *already* be the case - but @dahan1999 reported that
it fixed #2648.
2015-02-12 10:09:07 +01:00
Christian Kamm 91ae912373 ShareDialog: Don't crash with bad response. #2811 2015-02-11 16:02:50 +01:00
Christian Kamm 9aeda891c3 Nautilus integration: clean up, fix bugs #2820
* Fix various spaces vs tabs issues
* Rewrite
  - to use instance variables consistently
  - to not make shared state explicit instead of relying on
    class variables of a common base
* Fix reconnecting to an oC client.
2015-02-11 14:53:17 +01:00
Christian Kamm 5cdf448693 SyncJournal: Use DELETE journal mode on FAT filesystems. #2693 2015-02-11 14:03:55 +01:00
Christian Kamm 89c69250ef Fix crash in discovery thread dtor.
Occasionally on Windows ~DiscoveryMainThread() triggered a crash.

Probably because the QMutableLinkedListIterator was destroyed after
it's underlying data had been removed (from the map).

Cleaning up the map and lists was redundant anyway, so the
destructor is changed to only explicitly destroy the vio_file_stat
objects.
2015-02-11 14:00:23 +01:00
Christian Kamm 5b6a6319c2 Nautilus integration: Fix invalid member access #2819 2015-02-11 11:31:07 +01:00
Christian Kamm e79e2b80c8 SocketApi: Fix crash on exit. #2798
The _listeners list is destroyed before the _localServer.
And since _localServer is the parent of all generated QLocalSockets,
they get destroyed in turn - which triggers onLostConnection() and
thus accessed the destroyed _listeners list.

To avoid that, delete all active QLocalSockets in SocketApi before
its members are destructed.

We also now delete sockets when we're done with them. I think
disconnected sockets would otherwise linger until SocketApi destruction.
2015-02-11 09:50:10 +01:00
Christian Kamm f8b24ac34d Fix reconnection after long network outage #2321
The problem was that StatusNotFound can indicate either a transient
network problem or a permanent server configuration problem.
2015-02-11 09:24:56 +01:00
Christian Kamm 51b9ec30a9 Remove connect to removed slot.
This seems to have slipped back in, probably during a complex merge
in ba8b1bbe06.
2015-02-11 08:12:09 +01:00
Christian Kamm 49021fd96d SyncJournal: Reset all prepared statements. #2757
Makes closing of the database actually release file locks.
2015-01-30 15:35:42 +01:00
Christian Kamm 43d6dbb0f2 SQL: Add debugging options. #2693
OWNCLOUD_SQLITE_JOURNAL_MODE: To use something else than WAL
OWNCLOUD_SQLITE_TEMP_STORE: To test with storing temporaries in memory.
2015-01-29 11:02:01 +01:00
Christian Kamm cd0ad21132 SQL: Improve error reporting of failed exec(). #2693 2015-01-29 09:47:48 +01:00
Christian Kamm 5fc231cda4 Shib: Fix fetching of 'user'. #2751 2015-01-28 15:15:35 +01:00
Christian Kamm 2cee591b0e Merge branch 'sharedialog_fixes' of git://github.com/rullzer/client
Fix missing OcsShareJob constructor.

Conflicts:
	src/gui/sharedialog.cpp
2015-01-28 12:19:40 +01:00
ckamm 8a71d7d254 Merge pull request #2730 from rullzer/filebrowser_integration
Sharedialog: 404 is also an acceptable response when retriving shares
2015-01-28 12:09:33 +01:00
Christian Kamm 7950eb8ed6 sqlite: Update to version 3.8.8.1. #2750 2015-01-28 11:52:04 +01:00
Christian Kamm f59515883d FolderMan: Require 2s minimum delay.
Otherwise we run into "can't upload because it's too recent" issues
when the folder watcher triggers a sync.

We used to do this, but my recent refactoring started counting the
time since the last sync against this minimum delay, leading to
1ms delays in practice. This fixes the regression.
2015-01-28 11:24:47 +01:00
Christian Kamm 37680a0909 ShareDialog: Prepare for multiaccount. #43
Also fix a possible bug with the share dialog when no account
is configured.
2015-01-28 10:52:55 +01:00
Christian Kamm 350ad98c27 Folderwizard: Prepare for multiaccount. #43
Avoid accessing the global account instance and instead pass it in
from the outside.
2015-01-28 10:40:32 +01:00
Christian Kamm 094da51d82 FolderWatcher: Fix ignore list usage.
All patterns with started with a ] were not working correctly.
2015-01-22 15:42:47 +01:00
Christian Kamm fa4e6d8261 Exponential backoff for rapid follow up syncs. #2355 2015-01-22 08:55:52 +01:00
Christian Kamm 145df8ec67 Pause between sync runs (particularly long ones) #2355 2015-01-22 08:55:52 +01:00
Christian Kamm af5cbdbed8 Folder: Add timer for sync duration. 2015-01-22 08:55:52 +01:00
Christian Kamm aa6a5e4ac2 Credentials: Use the bound account everywhere.
This is preparation for multiaccount.
2015-01-16 15:22:56 +01:00
Christian Kamm 91fce3ea73 Make public API explicit about blacklist kind. #2301
'blacklist' can mean the selective sync blacklist or the error
blacklist. Names in public API are now explicit about which
blacklist is meant.
2015-01-16 10:17:19 +01:00
Christian Kamm b50475bc17 SQL: Fix error reporting on prepare fail. #2697 2015-01-16 09:12:25 +01:00
Christian Kamm 0af5574951 Propagate upload: code cleanup 2015-01-14 15:20:02 +01:00
Christian Kamm b3c02798a3 Propagator: Use FILE_SHARE_DELETE on Windows. #2070 #2597 2015-01-14 14:16:05 +01:00
Christian Kamm 9b7e6cc5c1 Fix warnings.
* remove Unused variable
* zorder for spacers makes no sense
2015-01-14 11:28:53 +01:00
Christian Kamm 4fa212c43b CSync callbacks: Don't use global account. 2014-12-18 15:39:51 +01:00
Christian Kamm a9da5ebff6 Wizard: Sometimes preserve folders when folder config is skipped.
* When folder config is used, other folder definitions are always
  removed.
* Fix a bug with the wizard becoming stuck when 'skip folder config'
  is used.
2014-12-18 15:39:51 +01:00
Christian Kamm 38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Christian Kamm 6c7acd585e Account: Split into libsync/Account and gui/AccountState.
This allows all the account state information to live in gui
while the sync-relevant data stays in libsync.

I also moved quotainfo to gui since it depends on the account state.
2014-12-18 15:39:51 +01:00
Christian Kamm a006c6962c Move account state related logic into Account.
The account state is now managed mostly by the Account itself
instead of through Application. The gui can still control whether
an account is signed out or not.
2014-12-17 12:01:10 +01:00
Christian Kamm 1a3041690f ConValidator: Simplify and cleanup.
* This way using it with multiple accounts will be easier.
* Timeouts on the authed requests are handled.
2014-12-11 14:48:01 +01:00
Christian Kamm 84e5ad7346 FolderMan: Delete old journal file when adding folder. #2606 2014-12-11 12:28:01 +01:00
Christian Kamm 4559bb5553 Fix counting of affected files. #1132
* Also ensure the maximum is always >= the current value.
* Take care to handle the ULLONG_MAX value that's sometimes used
  as _completedFileCount.
2014-12-11 11:33:42 +01:00
Christian Kamm d8c59fcb73 Use connection validator to ping the server. #2485
* Stop the quota job from having an effect on account status
  as it can sometimes take a long time to reply. See #2485 and
  owncloud/core#12744.

* Instead of indirectly using the quota job, use the connection
  validator to regularly ping the server with a basic PROPFIND for
  'getlastmodified' on /.
  This request was usually fast for users even when the quota PROPFIND
  was slow.
2014-12-10 13:40:11 +01:00
Christian Kamm 8dff17d78b Rename: Fix icon location in theme.qrc. 2014-12-10 13:12:06 +01:00
Christian Kamm 53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
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 8b45d1c928 Sync: Change force-sync interval to 2h everywhere. #2297 2014-11-20 13:38:32 +01:00
Christian Kamm 0fe7a69b39 FolderWatcher: Detect own changes. #2297 2014-11-20 13:16:29 +01:00
Christian Kamm 6d09f1b6c0 Folder watcher now reports changing paths instead of dirs. 2014-11-20 12:51:16 +01:00
Christian Kamm 1ada20ac7b Linux folderwatcher: Get full path of changed file. #2297 2014-11-20 12:42:59 +01:00
Christian Kamm d04eedeb8d OSX: Trust the file watcher. #2297
* Use a bigger default force sync interval (2h)
* Allow the file watcher to schedule a sync while a sync for
  the same file is running.
2014-11-20 12:42:59 +01:00
Christian Kamm f275002ebe Merge branch '1.7' 2014-11-20 12:41:06 +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 4d7b8bdb25 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	OWNCLOUD.cmake
	test/CMakeLists.txt
	test/testfolderwatcher.h
2014-11-19 14:45:25 +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 3706c76622 useLegacyJobs: Fix logic. 2014-11-19 10:31:42 +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 4e20a02fe5 SyncJournalDB: Add filesize column to metadata.
* Alter table to include column.
* Make get/set in SyncJournalDB store and load it.
* Make csync recover the stat_t's size member from it.
2014-10-29 09:53:36 +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 c832226aa1 Merge remote-tracking branch 'origin/1.7' into master 2014-10-22 12:25:58 +02:00
Christian Kamm a20375372d Blacklist: Don't ignore error files forever. #2247
Instead try them again regularly, but don't show the user any
error messages if the error persists.
2014-10-22 12:25:18 +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 7ae0338f5c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.h
	test/CMakeLists.txt
2014-10-22 10:41:55 +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