Commit Graph

21 Commits

Author SHA1 Message Date
Olivier Goffart
a6f1a976a6 fixup test 2020-02-10 15:15:15 +01:00
Olivier Goffart
aaa51e203d Tests: add a couple of move tests
This was an attempt to reproduce #7722, but this actually does not
reproduce it
2020-02-10 15:15:15 +01:00
Olivier Goffart
1597b2edc1 Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2019-10-07 22:36:55 +02:00
Christian Kamm
1e652e12b5 Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2019-08-30 18:33:23 +02:00
Christian Kamm
ca7b4be189 Fix and test _file and _renameTarget
There was a bunch of inconsistency around whether _file was set to
_renameTarget or not. This is now never done, passing on more
information.
2019-03-28 17:30:19 +01:00
Christian Kamm
3d18e52017 Discovery win: Fix detection of case-only renames
Previously they were detected as DELETE+NEW because if "a" is renamed to
"A" then QFile::exists("a") will still return true on Windows.
2019-02-28 08:43:41 +01:00
Christian Kamm
a627f373b1 Ensure local discovery on selective sync changes
As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.

Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.
2019-02-14 10:57:09 +01:00
Christian Kamm
5d777604f4 Tests: Add db checks to rename/move tests
For moves it's relevant that the old db entry is removed and the new one
is created at the right location.
2019-02-11 13:35:14 +01:00
Olivier Goffart
dfdcd3ff54 Move: Fix move detection in directory move on the other side 2019-01-22 08:14:12 +01:00
Olivier Goffart
8407f8b9e6 Move: add comments and tests 2019-01-22 08:14:12 +01:00
Olivier Goffart
303922b80f Move: add more test and fix move within moves 2019-01-22 08:14:12 +01:00
Olivier Goffart
a4990c0a85 Rename: fix renamed folder moved into renamed folder issue
Issue #6694
2019-01-22 08:14:12 +01:00
Olivier Goffart
597c28f316 Merge remote-tracking branch 'master' into new_discovery_algo 2018-08-21 11:22:38 +02:00
Olivier Goffart
4a3fce531c SyncEngine: Fix renames making hierarchy inversion
Issue #6694
2018-08-16 10:38:18 +02:00
Olivier Goffart
09deeaf8a8 Merge remote-tracking branch 'owncloud/master' into new_discovery_algo
Conflicts:
	src/csync/csync_reconcile.cpp
	src/csync/csync_update.cpp
2018-07-25 14:06:14 +02:00
Olivier Goffart
384afe195e New discovery algoritmh: more on Renames 2018-07-13 17:47:37 +02:00
Olivier Goffart
90ec9a9735 Reconcile: When detecting a local move, keep the local mtime
https://github.com/owncloud/client/issues/6629#issuecomment-402450691
2018-07-05 16:31:16 +02:00
Christian Kamm
afec3ccf6e Conflicts: Change tags to be more user friendly #6365
From "_conflict-user-yyyymmdd-hhmmss"
to   " (conflicted copy user yyyy-mm-dd hhmmss)"
2018-04-03 14:03:03 +02:00
Olivier Goffart
4369853ddb TestSystem: Add QIODevice in the serverOverride function, and add a DelayedReply
Preparing to add test that needs the QIODevice.
Also make the DelayedReply so we can generalize the existing delay on FakeChunkMoveReply
to any reply.
2017-12-14 11:56:12 +01:00
Christian Kamm
ceac18c554 Reconcile: Rename maps are consistent with update phase #6212
For duplicate file ids the update phase and reconcile phase determined
the rename mappings independently. If they disagreed (due to different
order of processing), complicated misbehavior would result.

This patch fixes it by letting reconcile try to use the mapping that the
update phase has computed first.
2017-12-06 16:42:11 +01:00
Christian Kamm
9c7ee6ef85 Reconcile: Rename handling fixes: duplicate file ids
When users share the same tree several times (say A/ and A/B/ are both
shared) the remote tree can have several entries that have the same
file id. This needs to be respected in rename detection.

Also adds several tests and fixes for issues noticed during testing.

See #6096
2017-10-24 10:54:23 +02:00