1
0
Fork 0
Commit Graph

385 Commits

Author SHA1 Message Date
Christian Kamm fe42c1a818 Activity: Skip PropagateDirectory jobs #3580
Previously, PropagateDirectory jobs didn't emit the completed() signal.
Now that they do, we need to make sure to not add extra lines to the
protocol widget for them.

To accomplish that, the jobCompleted() signal now also contains the job
that completed the item.
2015-08-11 15:19:09 +02:00
Markus Goetz 6110a99afc SyncEngine: Fix previous cherry-pick 2015-08-11 11:35:12 +02:00
Olivier Goffart 9dcce01e54 csync: ignore files/folder for which stat fails
instead of pretending it suicceed and not recursing in it.

This fixes a bug in which a folder with a too long name would be properly
created, then removed on the server in the next sync.

(cherry picked from commit 4bbf7669091cde7ec726b1708d8c54427b68f016)

Conflicts:
	csync/src/csync.h
	csync/src/csync_exclude.h
	csync/src/csync_update.c
2015-08-11 11:17:20 +02:00
Markus Goetz 7985c0d7f1 Merge pull request #3531 from jturcotte/master
Remove need for UPDATE_VIEW to refetch the status #2340
2015-08-06 11:03:28 +02:00
Markus Goetz f6cd2c79d5 CSync: Proper error for invalid filenames #2777 #3128 #2240 2015-08-04 22:13:38 +02:00
Jocelyn Turcotte 78b63c34cb Do not add all remote directories to the SyncItemVector
To allow forwarding all OK states of sync jobs to the socket API
we need to make sure that the vector doesn't contain unneeded items.

This initially was intended to force updating the metadata for parent
folders, but since then the should_update_metadata flag check was
added both here and in PropagateDirectory::finalize where the metadata
is actually updated for parent folders. We can safely remove the inclusion
of all remote directory items.
2015-07-31 21:59:58 +02:00
Jocelyn Turcotte 26d137cac6 SocketApi: Remove an unneeded emit syncItemDiscovered
The signal is emitted in this case if the instruction is NONE
but in the only ultimately connected slot to this signal,
SocketApi::slotSyncItemDiscovered, we return early according
to the same condition.

The emission of the same signal at the end of treewalkFile remains
and take care of the normal cases.
2015-07-31 21:59:58 +02:00
Olivier Goffart 0ccaae9a22 Confirm feature: Confirm for any folder, not only shared ones
issue #3148
2015-07-27 09:54:20 +02:00
Klaas Freitag 3a5f66e976 SyncEngine: Remove bogus logging. 2015-07-15 15:54:41 +02:00
Klaas Freitag 9461e4ccd1 Sync: Only copy the hasIgnoredFlag for the remote side.
Also added some documentation about the handling.
2015-07-15 15:53:58 +02:00
Klaas Freitag b0aedef4b0 Sync: Store information about ignored files on the server in database.
That allows better handling of remove requests that should not be done
because the directory is not empty on the remote side (as it contains
ignored files).
2015-07-15 15:49:27 +02:00
Klaas Freitag 7aa2b50828 csync_update: Handling hidden files as excluded files, as intended. 2015-07-15 15:20:46 +02:00
Christian Kamm 7edb57e46c Fix error message for invalid chars in filename #3432 2015-07-15 10:38:33 +02:00
Olivier Goffart 45180a024d Rename should_update_etag to should_update_metadata
This should avoid some confusion
2015-07-09 15:05:37 +02:00
Olivier Goffart 575ca50aac csync: Do not ignore hard links anymore
There is no reason to ignore them. Downloading a file that is hardlinked
will break the link.

Will solve syncing NTFS directories #3241
2015-07-01 13:05:08 +02:00
Olivier Goffart 2e177590a6 libsync: Remove some Theme dependency
Theme will eventually be moved to the GUI

Theme::appNameGUI and QApplicaiton::applicationName are the same, it is currently
set in the constructor of ConfigFile
2015-06-15 17:39:28 +02:00
Olivier Goffart 11c8415cd6 Coverity do not support non-static data initializer
Fixes #3337
2015-06-12 13:57:17 +02:00
Olivier Goffart 16786eed54 Merge pull request #3281 from owncloud/confirm
Confirm feature (sync engine part only)
2015-06-10 13:39:52 +02:00
Olivier Goffart e135d4cccf Merge remote-tracking branch 'origin/1.8' 2015-06-10 13:42:02 +02:00
Klaas Freitag fc2ceb88fb Rename thread to SyncEngine Thread to avoid confusion about Neon. 2015-06-06 10:49:47 +02:00
Olivier Goffart a621223cc8 SyncEngine: add an api to set the maximum size of new shared folder that do not require confirmation 2015-05-26 14:41:01 +02:00
Olivier Goffart 7bb2834d8b Confirm feature (The sync engine part) 2015-05-26 12:34:07 +02:00
Olivier Goffart 10d9e53159 Confirm feature: Use selective sync in the database 2015-05-26 12:34:07 +02:00
Olivier Goffart 6b27d2e703 Merge remote-tracking branch 'origin/1.8' 2015-05-26 12:28:31 +02:00
Markus Goetz 3556ed416c SyncJournalDB: Simplify code 2015-05-13 13:15:53 +02:00
Markus Goetz e5e2ce2b22 SyncEngine: Force re-read of folder Etags for upgrades from 1.8.0 and 1.8.1
This is a better fix than the previous one for the local-files-missing bug
because it does not depend on the sync run to run fully through.
2015-05-13 12:54:49 +02:00
Markus Goetz 08184d07cf Merge branch '1.9' 2015-05-12 23:03:45 +02:00
Olivier Goffart 76166c6252 SyncEngine: Fix comment
A comment should descibe the code, and not a patch.
2015-05-12 17:53:02 +02:00
Daniel Molkentin f315423811 Merge remote-tracking branch 'origin/1.8'
Conflicts:
	VERSION.cmake
2015-05-06 10:04:22 +02:00
Klaas Freitag d63abef718 SyncEngine: Handle upgrade case from 1.8.0
If 1.8.0 caused missing data in the local tree, this patch gets it
back. For that, the usage of the journal for remote repository is
disabled at the first start.
2015-05-04 13:40:25 +02:00
Christian Kamm 96ecdb866d Time estimate: Refactor remaining time guess. #2328 2015-04-22 11:20:31 +02:00
Christian Kamm 7d68c628db Time estimation: Use a consistent check for size dependence. #2328 2015-04-22 10:45:41 +02:00
Jocelyn Turcotte 12d7484b85 Pass SyncFileItems by pointer instead of by value
Use a QSharedPointer to keep the same ownership and
continue passing the SyncFileItems as a const& when
ownership isn't taken. This allows sharing the same
allocations between the jobs and the result vectors.

This saves about 20MB of memory (off 120MB) once all
jobs are created.
2015-04-18 14:26:40 +02:00
Olivier Goffart 8bb4af067a Propagate download: Fix restoring files for which the conflict file exists
For issue #3106

1) Always use the actual timestamp from the file in the file system
to create the conflict file.  This is important because if one edit a
file several time, they should have different name. Also it makes more
sens to have the mtime of the modified file.

2) Give the correct size to the job so we know when the temporary file
is complete in case of resuming.
2015-04-16 11:36:01 +02:00
Christian Kamm adcf40afc3 Discovery: Speed up initial run. #2796 2015-04-08 15:43:49 +02:00
Christian Kamm d986011067 Sync: Fix sync of deletions during 503. #2894 2015-04-08 10:50:08 +02:00
Markus Goetz 9b9f0bdd4d SyncEngine: Show more timing measurements #3064 2015-04-02 15:18:46 +02:00
Olivier Goffart dafc2d2b73 Sync engine: Check the blacklist for the right tree
When the operation is download, we have a INSTRUCTION_NONE for the local
tree, but we should not check the blacklist just yet.
2015-03-24 12:23:04 +01:00
Christian Kamm 9249d6c2f9 Logging: Print instruction when job completed. 2015-03-12 10:26:44 +01:00
Markus Goetz b622981b23 SyncEngine: Show a debug msg only when relevant 2015-03-06 09:28:50 +01:00
Markus Goetz 3f712dce02 ETags: For Folder and RequestEtagJob, always use Concatenation 2015-03-05 17:49:12 +01:00
Markus Goetz 2eaeaf33fa Discovery: Change abort code a bit
Now pressing pause in the UI will not show an error to the user.
2015-03-05 16:50:33 +01:00
Olivier Goffart ccbeb86140 Fix build of the legacy propagator 2015-03-03 10:05:38 +01:00
Markus Goetz fe574dbbf9 Discovery: Free some memory before propagate (#2902) 2015-03-02 15:08:21 +01:00
Christian Kamm b03209ccef Inform user about ignored long files. #2882 2015-02-27 12:12:39 +01:00
Christian Kamm 76ac628153 Discovery: Distinguish 503 Storage not available. #2884 2015-02-25 12:02:10 +01:00
Olivier Goffart 5e1aa7d383 SyncEngine: Fix move would re-upload the file
Because SyncJournalDb::postSyncCleanup was deleting the entries in the database
2015-02-19 15:00:37 +01:00
Olivier Goffart 1998b602b9 SyncEngine: better merge of the renames node
The same file is on the two sync trees under different names in case of a rename
We must therefore use the rename target as the key in the _syncItemMap to ensure
that the trees are correctly merged.

Also use the same UTF-8 decoding for the target than for the actual file in order
to catch invalid utf-8 in the rename target
2015-02-18 12:41:06 +01:00
Olivier Goffart fb77cd5f7e SyncEngine: Fix detection of the server reconfiguration
Some files might be kept (like the default files)
The files should be considered as NONE only if they are NONE on both trees

issue #2847
2015-02-17 16:44:13 +01:00
Volkan Gezer bd4f68233f some typos, grammar and sentence fixes 2015-02-14 23:47:07 +01:00
Olivier Goffart 5ec793e045 propagateupload: Save the mtime given by the server in the reply to GET
There could be a race condition if the file was updated on the server
between the discovery and the propagate phase. By taking the mtime from
the server, we make sure that we do not have a race.

This is tested by t6.pl with BIG3.file because the script was modifying
the file between the two phases
2015-02-06 10:23:20 +01:00
Olivier Goffart ca56e5d9ca SyncEngine: Fix crash
We must check if 'it' is not == to begin() before doing it-1
Also i believe the logic was reversed if it was begin()

Task #2765
2015-02-04 14:52:41 +01:00
Olivier Goffart db6214e090 SyncEngine: Do not assert when the neon session is 0
It can now be 0 if neon is not in used

Issue #2755
2015-01-30 01:05:46 +01:00
Olivier Goffart b856266e91 Remove neon link flag when not required 2015-01-23 17:35:17 +01:00
Markus Goetz 3885d5d706 Discovery: Report root etag from engine to folder
For #2352
2015-01-23 15:30:44 +01:00
Olivier Goffart 5c2298fa37 Discovery phase: fix a few warnings 2015-01-20 18:50:03 +01:00
Markus Goetz 906779c4b1 SyncEngine: Use QNAM for csync_update
This is for #2507
2015-01-20 18:27:25 +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
Olivier Goffart 264471af43 csync: cleanup some unused error code 2015-01-15 12:19:06 +01:00
Olivier Goffart 08d3ae9f02 csync_statedb: Have more granular error reporting when the loaddb fails
In order to distiguish error from sqlite_open or from the integrity check

Issue #2673
2015-01-15 11:36:24 +01:00
Daniel Molkentin c3468b7ed6 Merge remote-tracking branch 'origin/master' into accountstate
Conflicts:
	src/gui/owncloudsetupwizard.cpp
	src/gui/owncloudsetupwizard.h
	src/libsync/propagatedownload.cpp
	src/libsync/propagatedownload.h
2015-01-08 15:33:39 +01:00
Olivier Goffart 414ac5433d Merge branch '1.7'
Conflicts:
	binary
	doc/accountsetup.rst
	doc/architecture.rst
	doc/navigating.rst
	doc/owncloudcmd.rst
	doc/troubleshooting.rst
2015-01-05 14:40:53 +01:00
Christian Kamm 4fa212c43b CSync callbacks: Don't use global account. 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 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
Daniel Molkentin 3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart c9c1547813 Compile with Qt4
(QSharedPointer::reset is only in Qt5)
2014-11-25 16:24:47 +01:00
Olivier Goffart 1c58b75ac2 Merge branch '1.7' 2014-11-21 11:08:20 +01:00
Christian Kamm 0fe7a69b39 FolderWatcher: Detect own changes. #2297 2014-11-20 13:16:29 +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
Daniel Molkentin 7246011b62 Merge pull request #2459 from owncloud/typo
fix typo
2014-11-12 00:09:22 +01:00
Daniel Molkentin 281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Daniel Molkentin ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01:00
Olivier Goffart de11f602d5 Merge remote-tracking branch 'origin/il'
Conflicts:
	csync/src/csync_private.h
	src/CMakeLists.txt
	src/gui/folder.cpp
	src/libsync/owncloudpropagator.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagator_qnam.cpp
	src/libsync/propagator_qnam.h
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h
	src/mirall/syncjournaldb.cpp
2014-11-08 10:48:36 +01:00
Volkan Gezer 260c8e0227 fix typo 2014-11-07 17:51:15 +01:00
Daniel Molkentin f25d175b5d Merge remote-tracking branch 'origin/1.7' 2014-11-06 19:54:20 +01:00
Daniel Molkentin dc1e73dcb7 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/syncjournaldb.cpp
	test/CMakeLists.txt
2014-10-28 23:27:58 -04: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 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
Olivier Goffart 50e718b1e7 Merge branch '1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/folder.cpp
	src/gui/socketapi.cpp
	translations/mirall_ca.ts
	translations/mirall_cs.ts
	translations/mirall_de.ts
	translations/mirall_el.ts
	translations/mirall_en.ts
	translations/mirall_es.ts
	translations/mirall_es_AR.ts
	translations/mirall_et.ts
	translations/mirall_eu.ts
	translations/mirall_fa.ts
	translations/mirall_fi.ts
	translations/mirall_fr.ts
	translations/mirall_gl.ts
	translations/mirall_hu.ts
	translations/mirall_it.ts
	translations/mirall_ja.ts
	translations/mirall_nl.ts
	translations/mirall_pl.ts
	translations/mirall_pt.ts
	translations/mirall_pt_BR.ts
	translations/mirall_ru.ts
	translations/mirall_sk.ts
	translations/mirall_sl.ts
	translations/mirall_sv.ts
	translations/mirall_th.ts
	translations/mirall_tr.ts
	translations/mirall_uk.ts
	translations/mirall_zh_CN.ts
	translations/mirall_zh_TW.ts
2014-09-18 17:10:21 +02:00
Daniel Molkentin 902bb7a198 Merge remote-tracking branch 'origin/master' into move_lib_to_sep_dir
Conflicts:
	src/CMakeLists.txt
	src/gui/accountsettings.cpp
	src/gui/folderwizard.cpp
	src/gui/settingsdialog.cpp
	src/libsync/syncengine.h
2014-08-26 11:29:42 +02:00
Daniel Molkentin 4fc044d368 Merge branch 'master' into move_lib_to_sep_dir
Conflicts:
	cmake/modules/NSIS.template.in
	src/CMakeLists.txt
	src/creds/shibboleth/authenticationdialog.cpp
	src/creds/shibboleth/authenticationdialog.h
	src/gui/owncloudgui.cpp
	src/libsync/creds/shibboleth/authenticationdialog.cpp
	src/libsync/creds/shibboleth/authenticationdialog.h
	src/libsync/mirallaccessmanager.cpp
	src/mirall/authenticationdialog.cpp
	src/mirall/authenticationdialog.h
2014-08-12 21:08:44 +02:00
Daniel Molkentin bb32831a60 Merge remote-tracking branch 'origin/master' into move_lib_to_sep_dir
Conflicts:
	src/gui/folderman.cpp
2014-07-17 11:31:45 +02:00
Daniel Molkentin df3c3bca02 Split into three separate projects: library, gui and cmd 2014-07-11 11:07:31 +02:00