1
0
Fork 0
Commit Graph

31 Commits

Author SHA1 Message Date
Kevin Ottens 3182c613ac Take care of mangled paths on download as well
This means adjusting PropagateDownloadEncrypted so that it knows where
the file will end (otherwise it would create temporary files in non
existant paths for instance).
In turn we have to adjust PropagateDownloadFile accordingly so that it
resolves the local folder the file will end up in.
And last we adjust PropagateLocalMkdir to resolve paths as well and
demangle as needed.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-30 11:29:08 +02:00
J-P Nurmi 48acaec66f libsync: search'n'replace "Q_DECL_OVERRIDE" with "override" 2018-11-12 18:39:50 +01:00
Oleg Solovyov f9fe24feb9
Move remote-deleted files to trash
Squashed from https://github.com/owncloud/client/pull/6265

Linux only, Hidden option, disabled by default
2018-05-15 17:23:38 +02:00
Christian Kamm 01c2ffe2ae PropagateDownload: Read Content-md5 header #6088 2017-10-11 09:06:23 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Jocelyn Turcotte a8ea7b0858 Remove SyncFileItem::_isDirectory
It's always equivalent to _type == SyncFileItem::Directory.
2017-09-18 11:46:09 +02:00
Christian Kamm c8d0f788e0 Apply clang-format 2017-05-17 12:26:27 +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
Jocelyn Turcotte 0b098045f1 Replace WaitForFinishedInParentDirectory with WaitForFinished for directory moves
In preparation for the PropagateDirectory refactoring, simplify things
by removing WaitForFinishedInParentDirectory, which is currently
implemented as a one-level check.

This value is important for directory items, but is however never
used since a directory CSYNC_INSTRUCTION_RENAME item will always be in
PropagateDirectory::_firstJob, which will have to pass through its own
PropagateDirectory job's parallelism() before reaching the parent's
_subJobs optimization.
Since PropagateDirectory::parallelism can only return WaitForFinished
or FullParallelism, that value is lost. So this commit doesn't
change the behavior for directories, and allow file renames to be
scheduled in parallel across directories (which isn't a problem).
2017-02-23 17:54:33 +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
Christian Kamm d4edab02b0 Propagator: Deal with directories becoming files #4302
Note, in particular the revised order of directory deletion jobs.
2016-01-05 10:26:41 +01:00
Christian Kamm 5cc4c03b6a Propagator: Deal with files becoming directories #4302
This needed adjustments in reconcile, to mark the item as SYNC
as well as additions to the LocalMkdir job.
2016-01-05 10:26:41 +01:00
Christian Kamm 5ea09d2668 Checksum: Disallow ADLER32, use Adler32 #3735 2015-10-28 09:59:33 +01:00
Olivier Goffart e54253d845 PropagateLocalRemove: remove entries from the DB even if there was an error.
Previously, in case of an error while deleting a directory, we would not
remove the entries from the local db, despite most of the files would
be deleted.

Which means that if the files re-appear on the server with the same etag,
we would think the file were deleted from the client and propagate the change.

In 1.8.0 we had this bug that we would not see some directory in the server in
some cases. This would lead us to delete the file on the client.  Normaly the
files are deleted from the local database and next sync would re-download the files.
But in the cases where there was an error deleting one of the file (for example
if it was locked) we would then propagate the delete to the server.

Fix this by always deleting from the database the files that we deleted.

Issue #3206
2015-09-02 15:26:50 +02:00
Daniel Molkentin 66e8aaeabc Use doxygen style everywhere 2015-06-29 18:56:09 +02:00
Daniel Molkentin 0735aa1fbd Structure developer documentation
- rename target "doc-dev"
- group into modules
- move to doc/dev
2015-06-29 18:43:21 +02:00
Olivier Goffart 6b27d2e703 Merge remote-tracking branch 'origin/1.8' 2015-05-26 12:28:31 +02:00
Klaas Freitag dec3bd4a02 Some more minor cleanups based on the pull request review. 2015-05-20 22:44:12 +02:00
Klaas Freitag e18fd62f34 Propagator: checksum constants go to propatorjobs header.
So they can be used from both up- and download propagator jobs.
2015-05-19 17:09:40 +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 dcba129a98 Make it compile without neon 2015-01-23 17:56:46 +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 1113980b20 Propagator: Change the scheduler
It still needs to be a bit optimized, but it allows to paralelized jobs between directories

(this is required to paralelize the mkcol)
2014-11-18 17:35:31 +01:00
Olivier Goffart 14f5e8e32e Move all the neon code to the _legacy files 2014-11-14 16:13:50 +01:00
Olivier Goffart 1310bef528 Port the propagate mkdir to QNAM
This way we can make it parallel
2014-11-13 18:57:07 +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
Olivier Goffart c712b7c46c Parallel MOVE by porting the job to qnam 2014-11-11 16:09:01 +01:00
Olivier Goffart 134650eb44 Parallel DELETE 2014-11-11 13:19:29 +01:00
Daniel Molkentin ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01: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 df3c3bca02 Split into three separate projects: library, gui and cmd 2014-07-11 11:07:31 +02:00