1
0
Fork 0
Commit Graph

385 Commits

Author SHA1 Message Date
Olivier Goffart a9761a8976 Use qEnvironmentVariable* instead of qgetenv when appropriate
Now that we use Qt5, we should do that. It is slightly more efficient
and declares the intent.
(Modified using clazy)
2017-10-19 13:57:49 +02:00
Christian Kamm bf39343920 Sync: Add capability for invalid filename regexes #6092 2017-10-17 17:15:49 +02:00
Olivier Goffart 800b9cf167 SyncEngine: _hasNoneFiles should be set when there are INSTRUCTION_UPDATE_METADATA 2017-09-28 11:15:36 +02:00
Olivier Goffart 13e0cc6b50 Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
2017-09-26 16:14:17 +02:00
Jocelyn Turcotte 54c522c861 SyncJournalDb: Reimplement the db_is_empty logic from csync
This reduces the initial sync local discovery time from
2.0 to 0.6 seconds in LargeSyncBench on my machine.
2017-09-26 11:03:23 +02:00
Jocelyn Turcotte a034ee894c Use SyncJournalDb in csync
This gets rid of the csync_statedb sqlite layer and use
the same code and same connection as the rest of the SyncEngine.

Missing functions are added to SyncJournalDb and change a few minor
things (like changing SyncJournalFileRecord::_modtime to be an int64
instead of a QDateTime, like it was in csync).
2017-09-26 11:03:23 +02:00
Jocelyn Turcotte 6f46764daa SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-09-26 11:03:23 +02:00
Christian Kamm eae3f7ce0a SyncEngine: Adjust free space messaging
Before, the way the info message was phrased implied a failure. And
since the large numbers can be hard to compare that can be confusing.
2017-09-22 11:07:27 +02:00
Olivier Goffart 95d23b1914 RemotePermissions: Store in a class rather than in a QByteArray to save memory
Create a specific type that parses the permissions so we can store
it in a short rather than in a QByteArray

Note: in RemotePermissions::toString, we make sure the string is not
empty by adding a space, this was already existing before commit
e8f7adc7ca where it was removed by mistake.
2017-09-22 09:29:08 +02:00
Olivier Goffart ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Christian Kamm 53195b064a Conflicts: Upload them files if env variable says so
Set OWNCLOUD_UPLOAD_CONFLICT_FILES=1 to trigger this behavior.

Note that this is experimental and unsupported. The real feature is
likely to end up in 2.5.

Uploading conflict files is simply done by removing the pattern from
csync_exclude. The rest here deals with making the conflict notification
ui approximately work.

There are still some concerns about where an uploaded conflict file
appears in the sync protocol and issues list (it should be in both, but
is only in one of them currently!).

See #4557.
2017-09-19 11:45:38 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Jocelyn Turcotte 5fbed0d1cd Reverse the dependency between SyncJournalFileRecord and SyncFileItem
This will allow us to also use the SyncJournalDB in csync.
2017-09-18 14:00:52 +02:00
Christian Kamm 78212e03d6 Checksums: Clearer behavior and added testing 2017-09-18 12:52:09 +02:00
Jocelyn Turcotte a8ea7b0858 Remove SyncFileItem::_isDirectory
It's always equivalent to _type == SyncFileItem::Directory.
2017-09-18 11:46:09 +02:00
Jocelyn Turcotte 0e97770c47 Remove SyncFileItem::log
This remove the remaining "other" fields of the sync log to save a
bit of memory.

other_etag and other_fileId don't give much information to the users
and other_instruction will always be INST_NONE anyway.

other_modtime and other_size are kept since they are sometimes used.
They were renamed to have a bit more meaningful name.

SyncEngine::checkPermissions will now fetch its information from the
csync trees since they are now preserved until right after this point.

Fixes #3213
2017-09-18 11:46:09 +02:00
Jocelyn Turcotte 3d7bd7583b Remove SyncEngine::_remotePerms
Now that csync is using a more convenient data structure for
its file trees, wait a little bit longer before destroying them and
fetch the remote permissions from the remote tree there instead.
2017-09-18 11:46:09 +02:00
Jocelyn Turcotte d66c2b5fae Replace the custom rbtree by a std::map 2017-09-18 11:46:09 +02:00
Helmut K. C. Tessarek 709aa27031 remove qt4 code 2017-09-15 07:11:05 +02:00
Jocelyn Turcotte b1bb7ec1a8 Use a C++ contructor and destructor for CSYNC
Merge csync_create and csync_init into the constructor and
replace csync_destroy with the destructor.

Also use a QByteArray for csync_s::root_perms and flatten
csync_rename_s as a rename sub-struct of csync_s since it
can now handle C++ types.
2017-09-06 13:08:23 +02:00
Jocelyn Turcotte cb49635231 Replace TREE_WALK_FILE with csync_file_stat_t
Just expose csync_file_stat_t since we don't need an abstraction layer
anymore. Also pass the nodes of both trees directly to the visitor
function.

Issue #1817
2017-09-06 13:08:23 +02:00
Jocelyn Turcotte e8f7adc7ca Replace csync_vio_file_stat_t with csync_file_stat_t
Also move csync_normalize_etag to common/utility since we
don't need the char* function anymore.

Remove the single space file_stat->remotePerm codepath since
this won't be used in csync anymore since
8de3bda0b1.

Issue #1817
2017-09-06 13:08:23 +02:00
Jocelyn Turcotte 704ca366b3 Make csync_file_stat_t public and partly convert to C++
This is the first commit trying to unify csync_file_stat_s,
csync_vio_file_stat_s and csync_tree_walk_file_s. Use QByteArray
and unique_ptr already since I'm not used to track memory allocations
and this will make the transition easier.

Issue #1817
2017-09-05 17:25:19 +02:00
Jocelyn Turcotte a41dc00160 Don't keep the list of touched files for the whole sync
We only want to know if they were touched within the last 15 seconds,
so change the data structure to use a QMultiMap, and sort them by
QElapsedTimer. This allows us to iterate over old entries ordered by
time and to stop once we find a recent entry.

This makes the look-up slower but in most cases the folder watcher
will report any change within milliseconds, and we start from the
most recent. What this really makes slower are actual user file
changes while a fast sync is underways which will need to iterate
over the whole map to find out the file isn't there.

This reduces the growth of the memory usage when downloading a large
amount of files.
2017-07-24 17:54:29 +02:00
Olivier Goffart 520923b5a7 HTTP/2 Support
We need Qt 5.9 for HTTP2 because, even if Qt 5.8 already has support
for it, there is some critical bug in the HTTP2 implementation which
make it unusable [ https://codereview.qt-project.org/186050 and
https://codereview.qt-project.org/186066 ]

When using HTTP2, we can use many more parallel network request, this
is especially good for small file handling

Lower the priority of the GET and PUT propagation jobs, so the quota
or selective sync ui PROPFIND will not be blocked by them
2017-07-17 08:20:17 +02:00
Christian Kamm 2cdf5517cb Conflicts: Detect and show in issues tab
Incidentally fixes a potential issue where conflicts were silently-
ignored and thus deleted if the parent folder was deleted.
2017-07-13 11:48:10 +02:00
Christian Kamm da54b3d7e5 Merge remote-tracking branch 'origin/2.3' 2017-07-12 10:06:04 +02:00
Christian Kamm 971abaea80 IssuesWidget: Add button to retry 507 errors #5537
Since these errors are blacklisted, it can take up to 24h to retry items
that had a 507 error for a while. This way users can intervene and cause
an upload attempt immediately.
2017-07-12 09:04:27 +02:00
Christian Kamm cd1b89475c PropagateUpload: Better messaging for 507 #5537
It now produces a summary error message indicating the problem.

Adjust blacklist database table to contain 'errorCategory'. This is
useful for two things:
  - Reestablishing summary messages based on blacklisted errors. For
    example if we don't retry a 507ed file, we still want to show the
    message about space on the server
  - Selectively wiping the blacklist: When we have ui for something like
    "I deleted some files, please retry all files now!", we want to
    delete all blacklist entries of a specific category only.
2017-07-12 09:04:27 +02:00
Christian Kamm c3cb186952 ProgressInfo: Carry a sync status
* A bunch of code was determining sync status by ad-hoc comparing some
  progress info fields. It can now just check the status, making it
  easier to comprehend.
* There's a clear indication for "a new sync is starting", which helps
  wiping the issues tab at the right time.
2017-07-12 09:04:27 +02:00
Christian Kamm 5ca743dd25 SyncEngine: Introduce overall errors that are not tied to a file #5746
For now we use them for:
* csync errors: This allows them to appear in the sync issues tab
* insufficient local disk space, as a summary of individual file errors

Insufficient remote space will use them too, as might other issues that
are bigger than a single sync item.
2017-07-12 09:04:27 +02:00
Christian Kamm b1aaf055b1 Blacklist: Don't let errors become warnings #5516
Before, blacklisted errors were set to FileIgnored status and hence
displayed as warnings. Now, they have their own BlacklistedError
category which allows them to appear as errors in the issues list and in
the shell integration icons.
2017-07-04 13:07:51 +02:00
Markus Goetz f4d1a07b72 SyncEngine: Keep local size in SyncItem #5855 2017-07-04 11:42:44 +02:00
Jocelyn Turcotte 5d24a2dc0f Remove debug messages by default from sync.engine
Other categories were already set properly.
2017-06-15 20:10:30 +02:00
Christian Kamm 8160963110 Compare the hash of files with identical mtime/size #5589
* For conflicts where mtime and size are identical:

  a) If there's no remote checksum, skip (unchanged)
  b) If there's a remote checksum that's a useful hash, create a
     PropagateDownload job and compute the local hash. If the hashes
     are identical, don't download the file and just update metadata.

* Avoid exposing the existence of checksumTypeId beyond the database
  layer. This makes handling checksums easier in general because they
  can usually be treated as a single blob.

  This change was prompted by the difficulty of producing file_stat_t
  entries uniformly from PROPFINDs and the database.
2017-06-15 13:54:16 +02:00
Olivier Goffart 3314a472c3 SyncEngine: SelectiveSync: Remove local files of undelected folder despite other modified files
Issue #5783

When the directry that should be removed by selective sync contains changes,
we ignore the whole sub tree instead of only ignoreing new files.
We cannot ignore the whole directory, we need to ignore only the directory
that do not have files to remove
2017-06-08 14:53:54 +02:00
Christian Kamm c8d0f788e0 Apply clang-format 2017-05-17 12:26:27 +02:00
Jocelyn Turcotte 7fd2f292e7 Promote a few more logs to info/warning 2017-05-11 17:22:59 +02:00
Jocelyn Turcotte b7553d5bdf Upgrade some qCDebug to qCInfo or qCWarning
Use qCInfo for anything that has general value for support and
development. Use qCWarning for any recoverable error and qCCritical
for anything that could result in data loss or would identify a serious
issue with the code.

Issue #5647
2017-05-11 17:22:59 +02:00
Jocelyn Turcotte 4ad190a558 Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.

Issue #5647
2017-05-11 17:22:59 +02:00
Olivier Goffart 13705999f7 Discovery: Increase the MAX_DEPTH and show deep folder as ignored
Before this patch, to deep folder would just be ignored, without any feedback.
This patch makes it so deep folder are properly shown as ignored in the UI.

Also increase the MAX_DEPTH

Issue: #1067
2017-05-08 11:29:51 +02:00
Olivier Goffart bb244d527c Better words for the error message when one cannot create the database.
Issue #5291
2017-05-03 17:53:46 +02:00
Christian Kamm e86499d990 dynamic chunking: cleanup, fixes, improvements
* make target duration a client option instead of a capability
* simplify algorithm for determining chunk size significantly
* preserve chunk size for the whole propagation, not just per upload
* move options to SyncOptions to avoid depending on ConfigFile
  in the propagator
* move chunk-size adjustment to after a chunk finishes, not when
  a new chunk starts
2017-03-28 11:32:10 +02:00
Olivier Goffart 0ed929f24b SyncEngine: fix test regression in TestChunkingNG::testCreateConflictWhileSyncing
In 8ef11a38c9, we started blacklisting
SoftError for 0 seconds.  But if the two sync happen with less than
1s interval, we would still prevent them to happen.
So make sure we expire if 0 seconds have expired
2017-03-16 10:17:08 +01:00
Christian Kamm b98876e265 Account server version: Helper to create versions
Hex literals don't work well with version 10: 0x100000 doesn't do
the right thing.
2017-03-15 16:30:08 +01:00
Christian Kamm 4d7dd0c909 Recent Changes: Fix duplicates #5256
The transmissionProgress emission when the whole sync finishes
shouldn't look exactly like the one for the last file.
2017-02-16 15:10:46 +01:00
ckamm 7879c470b3 Merge pull request #5518 from ckamm/asserts
Improve usage of asserts
2017-02-08 15:25:02 +01:00
Christian Kamm 4c1fdf1dee Double check usage of asserts #5429
A few are supposed to be fatal.
2017-02-08 15:15:19 +01:00
Christian Kamm 18e25122db Performance: reserve() _remotePerm #5496 2017-02-08 15:06:09 +01:00
Olivier Goffart 0d16cf41fe Merge remote-tracking branch 'origin/master' into 2.3
We can do that because the only changes that were in master but not in 2.3 were the
translations change and documentation change, and the support for the 'M' permission
which we want in 2.3.
2017-01-27 17:45:05 +01:00
Olivier Goffart 38cf459b3e Confirm External Storage: adjust the notification message
We need to forward the information that the folder is an external storage
for the notification message.

Issue: https://github.com/owncloud/client/pull/5340#issuecomment-274878023
2017-01-27 15:59:59 +01:00
Olivier Goffart f854c5263b Wizard: Add options to ask confirmation for external storage
Added two checkboxes in the Account Wizard in the advanced page to change the first options.
Also added a checkbox in the general settings to ask for confirmation for external storages.

Theme options allow to hide the checkboxes in the wizard.

As described in issue #5340
2017-01-27 15:59:59 +01:00
Jocelyn Turcotte bb3efc5988 Clear SyncEngine::_remotePerms after the sync
Also make reuse the SyncFileItem::_remotePerm QByteArray allocation
instead of redoing the copy from the csync char*.
2017-01-26 17:13:54 +01:00
Jocelyn Turcotte b0700ebbab Remove duplicate SyncFileItem entries for the log
The accuracy of that log isn't as important as the few bytes those
fields take as hostage for the whole sync.
2017-01-26 17:13:54 +01:00
Jocelyn Turcotte ee211d7609 Release SyncFileItem objects with their job
We now delete subjobs as their propagation is complete. This allows us
to also release the item by making sure that nothing else is holding a
reference to it.

Remove the stored SyncFileItemVector from SyncEngine and SyncResult
and instead gather the needed info progressively as each itemCompleted
signal is emitted.

This frees some holes on the heap as propagation goes, allowing many
memory allocations without the need of requesting more virtual memory
from the OS, preventing the memory usage from increasingly growing.
2017-01-25 23:26:23 +01:00
Jocelyn Turcotte 1fc5a76622 Pass the SyncFileItem as SyncFileItemPtr in itemCompleted
This will allow us to keep a reference on the items in connected slots.
2017-01-25 23:26:23 +01:00
Jocelyn Turcotte a764d7eb86 Don't pass the PropagatorJob in itemCompleted
This was to catch duplicate emissions for PropagateDirectory but we
don't emit this signal anymore from there.
This fixes a warning about PropagatorJob not being a registered metatype.

This reverts commit fe42c1a818.
2017-01-25 23:26:23 +01:00
Olivier Goffart a63d970e5e ChunkingNG: remove stale chunks when cleaning the uploadInfo table
Stale chunks might be there because a file was removed or would just not
be uploaded, for any reason.
We just start the DeleteJob but we don't care if it success or not.

Relates to https://github.com/owncloud/core/issues/26981

One of the test is testing the case where the file is modified on the server
during the upload. So this test the precondition failed error.
The FakeGetReply logic was modified because resizing a 150MB big QByteArray
by increment of 16k just did not scale when downloading a big file.
2017-01-20 14:48:53 +01:00
Olivier Goffart 9b96899d75 Sync Engine: Specify what chars are not syncable in the error message #1733 (#5449) 2017-01-18 11:45:46 +01:00
Christian Kamm e306f4611c Reschedule a folder regularly with some delay for some errors
Like "folder doesn't exist" - such that we will detect when the folder
becomes available and start syncing.

See #5317
2017-01-02 08:52:26 +01:00
Christian Kamm 3912dba33a Move qDeclareMetatype from Folder to SyncEngine 2016-12-20 11:43:39 +01:00
Christian Kamm 3e59a9b316 Merge branch 'master' into dbjournal_per_account 2016-11-23 16:47:56 +01:00
Olivier Goffart a1dc4069c9 libsync: Don't store the remote URI in the csync or in the SyncEngine
We are going to change the webdav path depending on the capabilities.
But the SyncEngine and csync might have been created before the capabilities
are retrieved.

The main raison why we gave the path to the sync engine was to pass it to csync.
But the thing is that csync don't need anymore this url as everything is done by the
discovery classes in libsync that use the network jobs that use the account for the urls.
So csync do not need the remote URI.

shortenFilename in folderstatusmodel.cpp was useless because the string is the
_file of a SyncFileItem which is the relative file name, that name never
starts with owncloud://.

All the csync test creates the folder because csync use to check if the folder
exists. But we don't need to do that anymore
2016-11-21 08:09:11 +01:00
Christian Kamm e485c5c008 Always send a progress message at the end of a sync #5290
Some listeners detect whether a sync is finished by checking
for isUpdatingEstimates and completedFiles >= totalFiles. But
if a sync didn't transfer any files we never sent signal
with these values. Now we do.
2016-11-18 12:33:44 +01:00
ckamm 36d61ef3a9 Doc: Add sync algorithm overview and comments (#5277)
* Doc: Add sync algorithm overview and comments
2016-11-08 16:10:55 +01:00
Olivier Goffart e3a4c3989a SyncEngine: disable heuristics for backup restoration for server >= 9.1
The ownCloud 9.1 server has a data-fingerprint property that the admin must
change in case of backup restoration. When this change, the client understands
that a backup was restored, and will generate conflict files and re-upload
new files.

The heuristics based system checks that there is at least two files wose mtime
is put back in the past and no files that goes forward. In that case we ask the
user before creating the conflicts.

This commit disable the heuristics for newer server that have the data-fingerpint.
And change the heuristics to two hours because we want to avoid false positive due
to some clock error, and that 2 hours of lost due to backup restoration is probably
not so bad.

We only ask the user in the heuristics based aproach so in practice this mean that
the "backup-detected" dialog will no longer appear with newer server.

Relates issues #5260, #5109
2016-11-04 16:30:58 +01:00
Olivier Goffart 36a19703db SyncEngine: Permission error in subfolder of a folder that cannnot be added is a SoftError
Issue #5059
2016-10-17 12:22:04 +02:00
Klaas Freitag e1a48e3c33 Move the journal file name generation to the syncjournaldb class.
As requested by Olivier.
2016-10-10 16:59:17 +02:00
Olivier Goffart 85b8ab178e SyncEngine: Fix renaming of folder when file are changed (#5195)
Two bugs:
 - The change filed are not considered as move, they are re-downloaded
   but the old file was not removed from the database. The change in
   owncloudpropagator.cpp takes care of removing the old entries.

 - Next sync would then remove the file in the server in the old folder
   This was not a problem until we start reusing the sync engine, and
   that the _renamedFolders map is not cleared. We were before deleting
   a non-existing file. But now we delete the actual file.

Also improve the tests to be able to do move on the server.
This include support for file id.

Issue #5192
2016-09-22 09:02:47 +02:00
Klaas Freitag 84ede3f01f Make sync journal name generating a method of SyncJournal.
Before it was in Folder, however, the command line client does not
have the Folder class. To not duplicate code, the function to generate
the sync journal name went to SyncEngine class.
2016-09-02 16:19:10 +02:00
Klaas Freitag e46fad52bb Make the sync journal file name a method of the Folder class.
The sync journal name has a dependency on the remote url now.
2016-09-02 12:29:21 +02:00
Markus Goetz 6ecda6e7f4 Merge branch '2.2' 2016-08-24 11:39:12 +02:00
Jocelyn Turcotte efb6b8c2c9 [overlays] Fix folders appearing as OK even though children are still syncing #4797
This would happen if the directory would first need to be created
through an mkdir propagation job. This job's itemCompleted signal
would trigger the directory to show as SYNC even though its children
are still propagating.

Fix the issue by tracking the sync count for each file, affecting
its parents. This allows us to get rid of the O(n) vector lookup
for each status query, and properly track the hierachical sync
status of a directory.

This also removes the itemCompleted signal emission from the
PropagateDirectory job. Since we only needed for overlay icons, and
since this job doesn't do any direct propagation, we can remove it
to ensure that we won't call itemCompleted twice for the item attached
to Propagate*Mkdir jobs (since the PropagateDirectory is backed by
the same SyncFileItem, instruction and status).
2016-08-17 15:40:02 +02:00
Jocelyn Turcotte e974771796 csync: Use an explicit instruction for should_update_metadata
The current way of tracking the need to update the metadata without
propagation using a separate flag makes it difficult to track
priorities between the local and remote tree. The logic is also
difficult to logically cover since the possibilities matrix isn't
100% covered, leaving the flag only used in a few situations
(mostly involving folders, but not only).

The reason we need to change this is to be able to track the sync
state of files for overlay icons. The instruction alone can't be
used since CSYNC_INSTRUCTION_SYNC is used for folders even though
they won't be propagated. Removing this logic is however not possible
without using something else than CSYNC_INSTRUCTION_NONE since too
many codepath interpret (rightfully) this as meaning "nothing to do".

This patch adds a new CSYNC_INSTRUCTION_UPDATE_METADATA instruction
to let the update and reconcile steps tell the SyncEngine to update
the metadata of a file without any propagation. Other flags are left
to be interpretted by the implementation as implicitly needing
metadata update or not, as this was already the case for most file
propagation jobs. For example, CSYNC_INSTRUCTION_NEW for directories
now also implicitly update the metadata.

Since it's not impossible for folders to emit CSYNC_INSTRUCTION_SYNC
or CSYNC_INSTRUCTION_CONFLICT, the corresponding code paths in the
sync engine have been removed.

Since the reconcile step can now know if the local tree needs metadata
update while the remote side might want propagation, the
localMetadataUpdate logic in SyncEngine::treewalkFile now simply use
a CSYNC_INSTRUCTION_UPDATE_METADATA for the local side, which is now
implemented as a different database query.
2016-08-17 15:39:31 +02:00
Jocelyn Turcotte b7ff4a76e8 Add TestSyncEngine and TestSyncFileStatusTracker auto tests
To be able to test the SyncEngine efficiently, a set of server
mocking classes have been implemented on top of QNetworkAccessManager.

The local disk side hasn't been mocked since this would require adding
a large abstraction layer in csync. The SyncEngine is instead pointed
to a different temporary dir in each test and we test by interacting
with files in this directory instead.

The FakeFolder object wraps the SyncEngine with those abstractions
and allow controlling the local files, and the fake remote state
through the FileModifier interface, using a FileInfo tree structure
for the remote-side implementation as well as feeding and comparing
the states on both side in tests.

Tests run fast and require no setup to be run, but each server feature
that we want to test on the client side needs to be implemented in
this fake objects library. For example, the OC-FileId header isn't
set as of this commit, and we can't test the file move logic properly
without implementing it first.

The TestSyncFileStatusTracker tests already contain a few QEXPECT_FAIL
for what I esteem being issues that need to be fixed in order to catch
up on our test coverage without making this patch too huge.
2016-08-17 15:39:30 +02:00
Olivier Goffart 4a7f3cb486 SyncEngine: Fix detection of backup (#5104)
Once upon a time, the SyncEngine was instantiated once per sync. But now that
the SyncEngine is kept between sync, we need to reset all these variable between
syncs.
2016-08-04 16:06:10 +02:00
Olivier Goffart 88e5a9411a SyncEngine: Reads the data-fingerprint property (#5056)
When it changes, assume a backup was recovered, and keep conflict files.

Issues: #2325 and https://github.com/owncloud/enterprise/issues/966
2016-08-02 10:30:49 +02:00
Klaas Freitag 5ac434a740 Logs: Add the name of the platform we're running on to the log. (#5082) 2016-07-28 16:30:40 +02:00
Klaas Freitag 4ceee86c66 SyncEngine: Calculate a uniq journal name using the remote account.
That should allow to sync the same local folder to multiple remote destinations.

see #3764
2016-07-10 12:56:43 +02:00
Christian Kamm bd7ec19644 Set discovery thread priority to low #5017 2016-07-05 13:53:57 +02:00
Christian Kamm 6e9df8673f Merge remote-tracking branch 'origin/2.2' 2016-06-22 15:41:37 +02:00
Olivier Goffart 92309013da SyncEngine: make abort and closing more robust
We first need to set the abort flag to csync and then aborting the discovery
job, otherwise, the discovery thread could start a new job in the mean time.

We also need to make sure that the thread has existed before we destroy the
exclude list.
2016-06-16 08:26:33 +02:00
Christian Kamm 87b4693a9d Add error message for trailing spaces on Windows #4878 2016-06-09 12:41:02 +02:00
ckamm 28c12a3ca0 Move touched-files tracking to SyncEngine #4927 (#4946) 2016-06-09 12:07:18 +02:00
Olivier Goffart fff5c280b3 SyncEngine: cleanup setting isDirectory 2016-05-25 16:27:40 +02:00
Olivier Goffart e960b265a8 Merge remote-tracking branch '2.1' into 2.2 2016-05-25 16:23:58 +02:00
Olivier Goffart f6b35e5d58 SyncEngine: invalid the blacklist entry when the rename destination change
The problem in this case is if we rename the file "xxx" to "invalid\file".
The rename will fail because the new filename constains a slash, and it
will be blacklisted.
But then if the user re-rename the file to "valid_name", then we should
invalidate the blacklist entry and retry to upload. But we did not do
that because renaming don't change the mtime and we did not store the
rename target in the database

IL issue 558
2016-05-25 15:32:45 +02:00
Markus Goetz 552ba94c41 SyncEngine: Set isDirectory before syncItemDiscovered
(cherry picked from commit fc1933803e)
2016-05-20 17:00:22 +02:00
Markus Goetz fc1933803e SyncEngine: Set isDirectory before syncItemDiscovered 2016-05-20 16:58:44 +02:00
ckamm c6794cd338 Progress info: Reset between syncs #4856 (PR #4872) 2016-05-20 15:07:54 +02:00
Olivier Goffart 5676685f58 SyncEngine: Add a compile option so we rename to restoring a move we don't have the permission to do
IL issue 550
2016-05-12 13:15:30 +02:00
Jocelyn Turcotte 32b3023a8e Fix the root item sync status #4682
Make sure that we push the new status when the status of the SyncEngine
changed. SyncEngine::started comes a bit late, only when the propagation
starts, although it's better in this case since child folders will
only switch to Sync in aboutToPropagate.

Also fix an issue with SyncEngine::findSyncItem when using an empty
fileName; this would match and return the wrong item, even though
not currently happening with the code since fileStatus won't call
it with an empty fileName anymore.
2016-05-03 13:01:51 +02:00
ckamm e6b937f508 LockWatcher: Keep an eye on Windows file locks (#4758)
When a conflict-rename or a temporary-rename fails, notify the
LockWatcher. It'll regularly check whether the file has become
accesible again. When it has, another sync is triggered.

owncloud/enterprise#1288
2016-04-29 16:14:18 +02:00
Klaas Freitag d433c24186 Check if the record returned from getFileRecord is valid.
Handle database fails properly.
2016-04-11 16:04:20 +02:00
Klaas Freitag ee58cc3b66 SyncEngine: Close the sync journal after the sync run has finished. 2016-04-11 11:31:54 +02:00
Klaas Freitag e4604b406f SyncEngine: finalize properly on error with syncjournal 2016-04-06 17:20:48 +02:00
Klaas Freitag 7b1f02fcda SelectiveSync: Verify if the list could be read from journal.
If there is a read error from the database while trying to get
the list from database, make sure to not behave badly because
the list is empty.
2016-04-06 15:01:28 +02:00
Olivier Goffart 3334067d9f Merge branch '2.1'
Conflicts:
	src/gui/socketapi.cpp
2016-04-04 16:58:49 +02:00
Olivier Goffart 434d16941b SyncEngine: fixed restoring files when they are moved in a new directory
Imagine tgus scenario on a read only share that you move file from
one location to a new directory in the read only share.
Creating the read only directory fails for permission error.
But we should also restore the files that have been moved.

IL issue 542
2016-04-04 10:41:12 +02:00
Jocelyn Turcotte 82190eaa81 Refactor the overlay icon logic to show errors as a warning for parent folders #3634
This also remove all smartness from the SocketApi about the status
of a file and solely use info from the current and last sync.
This simplifies the logic a lot and prevents any discrepancy between
the status shown in the activity log and the one displayed on the
overlay icon of a file.

The main benefit of the additional simplicity is that we are able
to push all new status of a file reliably (including warnings for
parent folders) to properly update the icon on overlay implementations
that don't allow us invalidating the status cache, like on OS X.

Both errors and warning from the last sync are now kept in a set,
which is used to also affect parent folders of an error.

To make sure that errors don't become warning icons on a second
sync, SyncFileItem::_hasBlacklistEntry is also interpreted as an error.
This also renames StatusIgnore to StatusWarning to match this semantic.

SyncEngine::aboutToPropagate is used in favor of SyncEngine::syncItemDiscovered
since the latter is emitted before file permission warnings are set on the
SyncFileItem. SyncEngine::finished is not used since we have all the
needed information in SyncEngine::itemCompleted.
2016-03-28 14:29:48 +02:00
Jocelyn Turcotte 69aa39f1f6 Don's use SyncFileStatus for Folder::createGuiLog
SyncFileStatus' purpose is to track overlay icon status.
Instead of putting comments and default: clauses in switch
on both sides about unused enums, use different enums.

This also remove STATUS_NEW which is the equivalent of
STATUS_SYNC in all shell extension implementations, and
remove STATUS_UPDATED and STATUS_STAT_ERROR which have
the same semantic as STATUS_UPTODATE and STATUS__ERROR.
2016-03-28 14:29:47 +02:00
Jocelyn Turcotte da7b9916e5 Move the SocketApi business logic to a libsync SyncFileStatusTracker class
This will allow testing this code and avoid going through too many
layers to get notified and a file status changed.
2016-03-28 14:29:47 +02:00
Jocelyn Turcotte 2d2c7bc9b8 Move the SyncEngine construction to the Folder constructor
The SyncEngine is now created only once, at construction of the
Folder, instead of being reconstructed on each sync.
2016-03-28 13:26:38 +02:00
Luca Niccoli 6735126c09 Fix crash due to destruction order 2016-03-18 16:41:48 +01:00
Olivier Goffart 80b5f3f43d Never overwrite the size from the db when updating the metadata
the size on the server might be different from the size on the client
with certain backend so it should be ignored.

(cherry picked from commit 9222db6df9b19a21e1bea5a238d745d96a6385e3)
2016-03-17 10:48:49 +01:00
Markus Goetz 9460aa7f21 SyncEngine: Also emit item in other code path
Else a user of this library cannot build a complete list of items.
2016-03-14 18:12:07 +01:00
Jocelyn Turcotte e91a5c85ff Move the Logger reference back into src/gui 2016-03-03 20:26:48 +01:00
Jocelyn Turcotte b8227afcaa Move the csync_context creation in SyncEngine
The creation doesn't need to be separated from the SyncEngine anymore.
This allows the SyncEngine to be created in fewer steps if we want to
use it in tests.

This moves most of the direct csync code from Folder into the SyncEngine.
The exclude file logic for the context has been wrapped using the
existing ExcludedFiles class as well.
2016-02-25 20:53:13 +01:00
Olivier Goffart b3d57f3c7c Cleanup syncengine after the new option not to ask confirmation when everything is removed
Cleanup after pull reuqest  #4389

Do not make the SyncEngine depends on the ConfigFile
2016-02-22 16:14:22 +01:00
Markus Goetz a76ba06817 Merge pull request #4389 from Bottswana/deleteprompt
Add option to disable the delete all files prompt
2016-02-22 15:44:50 +01:00
Markus Goetz 5d7aa792e7 SyncEngine: Improve error message for ignored files/folders #4143 2016-02-22 11:13:29 +01:00
Olivier Goffart c93ecfbfb5 Merge branch restore_backup 2016-02-10 17:47:06 +01:00
James Botting d8af949a6a Alter sync engine to check new setting before displaying prompt 2016-01-24 18:45:29 +00:00
Olivier Goffart 47710d167a SyncEngine: fix inode after move if the file has moved on the file system
This is the fix for issue #4370

Step to reproduce the bug:
 1) have lots of files in directory "dir1"
 2) do mkdir dir2 && mv dir1/* dir2
 3) DURING the sync (which takes time because of the many moves) do mkdir dir3 && mv dir2/* dir3/
 4) observe that files are PUT in the next sync

The problem is that SyncJournalFileRecord::SyncJournalFileRecord will fail to
get the inode after the forst move because the files are already moved on the
filesystem.  Normaly it should use the inode from the discovery phase in that
case but that is not working because it comes from the remote node in case of
moves, so the code in SyncEngine::treewalkFile would not set the inode.

Test in https://github.com/owncloud/smashbox/pull/143
2016-01-20 13:49:12 +01:00
Olivier Goffart bbedeed1c5 SyncEngine: For server older than 8.1, ignore invalid char in new directories
Server older than 8.1 cannot cope with invalid char in the filename
so we must not send them from the client. We were already checking
for new files, but not for renames or new directories.

https://github.com/owncloud/enterprise/issues/1009
2016-01-13 17:53:12 +01:00
Christian Kamm abf5a5ad1e Propagation: Fix dir <-> file changes propagating to server #4302
* Ensure every time a file becomes a directory or the other way around
  the item is flagged as INSTRUCTION_TYPE_CHANGE.
* Delete the badly-typed entity if necessary in the propagation jobs.
2016-01-08 05:38:08 +01:00
Daniel Molkentin 9c7066ac47 Translation cleanups
- Disambiguation
- Remove potentially illigitmate concatenations
2016-01-06 16:50:59 +01:00
Jocelyn Turcotte 62df938465 Rename SyncFileStatus::STATUS_SYNC to STATUS_UPTODATE
Also use STATUS_UPDATED instead to match SyncFileItem::Success in the SocketAPI.
2016-01-05 15:41:15 +01:00
Jocelyn Turcotte 6e3809528e Fix OK statuses not being broadcasted during a sync #3944
Since the presence of any path in SyncEngine::_syncedItems
would translate in a SYNC status, platforms that don't refresh
all their status cache after an UPDATE_VIEW message like OS X
or Windows would keep displaying that status even after all
files are successfully synchronized.

- Read SyncFileItem::_status to determine the status to display mid-sync
- Match moved paths also to _renameTarget since this might be the
  path to match
- Make sure that PropagateDirectory jobs also set SyncFileItem::_status
  properly
2016-01-05 15:08:26 +01:00
Christian Kamm 2662203fb7 Windows: Fix deleting and replacing of read-only files #4308 2016-01-05 13:15:59 +01:00
Olivier Goffart 1bb76f5343 Attempt to recover from backup restoration on the server
If all the files bring us to past timestamp, it is possibly a backup
restoration in the server. In which case we want don't want to just
overwrite newer files with the older ones.

Issue #2325
2016-01-05 12:14:18 +01:00
Christian Kamm 2458f07ca1 Checksums: Reuse the discovery checksum where possible 2015-11-23 14:13:10 +01:00
Christian Kamm 6cf5fc7f7d Permissions: Keep more user permissions
t4.pl discovered that it'd needlessly override permissions sometimes
2015-11-23 13:24:05 +01:00
Christian Kamm a25f094c4c Checksums: Don't reupload if size and checksum are unchanged #3235
* Compute the content checksum (in addition to the optional
  transmission checksum) during upload (.eml files only)

* Add hook to compute and compare the checksum in csync_update

* Add content checksum to database, remove transmission checksum
2015-11-23 11:59:56 +01:00
Olivier Goffart 0020211857 owncloudcmd: Don't do a check that file are older than 2s (#4160)
This is required for the smashbox test to pass
2015-11-20 15:16:09 +01:00
Klaas Freitag 62d26814b2 SyncEngine: Handle 403 Forbidden properly.
A 403 is a reply code sent from the file firewall to indicate that
this directory is forbidden to use for the user.

The patch handles it by setting the state to IGNORED.

This addresses #3490
2015-11-18 15:31:55 +01:00
Christian Kamm 17dd199cba Checksums: Treat more carefully in db #4034
In particular, preserve them on local rename or remote move.
2015-11-10 15:05:00 +01:00
Christian Kamm 175ad6fb77 Reflect read-only permissions in filesystem #3244 2015-11-10 10:14:25 +01:00
Olivier Goffart 0c467ef5b4 Sync engine: fix signal/slot connection 2015-10-30 13:21:34 +01:00
Olivier Goffart c3cf6aef7d SyncEngine: Don't whipe the white list if the sync was aborted
Issue #4018
2015-10-29 16:47:39 +01:00
Olivier Goffart 38a8e5ee03 Discovery: conding style: use const references for function parameters 2015-10-29 16:47:36 +01:00
ckamm 251679253a Merge pull request #3951 from ckamm/checksum
Checksums stored in database #3735
2015-10-29 10:40:24 +01:00
Christian Kamm 496b1e907d Checksum: Don't lose it on metadata update #3735
Also improve tests.
2015-10-28 14:49:55 +01:00
Markus Goetz a6c9e8c5b4 Merge branch 'kill_legacy_propagator' 2015-10-28 11:06:50 +01:00
Markus Goetz 9337927722 legacy propagator: Remove more code 2015-10-28 10:59:02 +01:00
Olivier Goffart cf242871ea SyncEngine: keep a static pointer to the codec
The QTextCodec for UTF-8 is not going to change during the application life time.
So no need to look it up for every file
2015-10-21 16:38:26 +02:00
Olivier Goffart 9c388787bb csync_update: Don't fetch the etag in the local discovery from the DB
We don't need it, and it's slow.
This saves a lot of DB queries

(Also replaced a strlen>0 with a faster check)
2015-10-21 16:38:26 +02:00
Markus Goetz c8590c4468 Remove legacy propagator and neon
The code was already uneeded/unbuilt on Windows and OS X.
2015-10-20 17:57:43 +02:00
Markus Goetz ccec186b98 ETagJob: Depth 0 for server >= 8.1 #3730 2015-10-19 15:31:27 +02:00
Olivier Goffart df135a0bb2 Merge branch '2.0'
Conflicts:
	src/gui/folder.cpp
2015-10-19 10:57:37 +02:00
Olivier Goffart 0c59c85127 SyncEngine: Folders with ignored files should not count when counting none files
If there is a any none files, we do not show the dialog saying that all
files have been removed. If a directory contiains ignored files, we still
want to show this message box even if the directory will not be deleted
2015-10-16 11:43:52 +02:00
Phil Davis f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Christian Kamm efefc2d986 Merge branch '2.0'
Conflicts:
	doc/images/menu.png
	doc/images/settings_network.png
2015-10-02 15:44:50 +02:00
Christian Kamm cf9e5ffb0b Remove dead code
no_recursive_propfind does not exist anymore.
2015-10-02 15:17:19 +02:00
Christian Kamm 36e8e9ebf5 Propagator: Download disk space checks #2939
* There's a critical 50 MB threshold under which syncs abort
  (OWNCLOUD_CRITICAL_FREE_SPACE)
* The sync client always keeps 250 MB free
  (OWNCLOUD_FREE_SPACE)
2015-10-01 12:59:05 +02:00
Christian Kamm 12dc372b21 Sync: An initial diskspace check #2939
* Before each sync, check that there are at least
  250 MB of space available and abort otherwise.
* Can be overridden with OWNCLOUD_MIN_FREE_SPACE
2015-10-01 10:25:35 +02:00
Daniel Molkentin f1a9e669b4 SyncEngine: fix typo 2015-09-14 13:57:51 +02:00
Klaas Freitag df534753b1 csync_update: Handle permission denied as soft error in discovery.
For that, treat the not accessible directory as if it were ignored.

This will fix #3767
2015-09-09 14:12:13 +02:00
Daniel Molkentin 66f340734c Consistency: Use folder instead of directory in user visible strings 2015-09-07 08:51:40 +02:00
Christian Kamm 5bd631e8e7 Rename jobCompleted -> itemCompleted.
Because that's what's going on. A job can 'complete an item' or 'finish'.
Note that several jobs could complete the same item: a new directory
will complete on the PropagateRemoteMkdir and the PropagateDirectory
jobs.
2015-08-11 15:19:09 +02:00
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