Commit Graph

134 Commits

Author SHA1 Message Date
Dimitri Papadopoulos 9d830e94f9 Fix typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-06-21 08:47:13 +02:00
alex-z e6f003b00b Remove stale caseclash conflicts when one of conflicting files has been removed from server
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-06-15 10:13:22 +02:00
Matthieu Gallien 5372276779 add more metadata to sync errors to allow filtering
in order to be able to filter some errors when showing them into the
main dialog activity list, add some more info about the error to know
the origin (like a network issue or a sync issue)

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-07 17:25:44 +02:00
alex-z 81ecba8daa Allow opening a file or folder in the local sync root.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-05-16 12:33:34 +02:00
Matthieu Gallien 5cb3266f7f fix compilation with clazy and fully-qualified-moc-types checks enabled
will make all signals and slots be using fully qualified data types

makes code safer

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-04-11 11:34:00 +02:00
Matthieu Gallien 079d392d36
move init to default value in class declaration
done via clang-tidy and manual tuning

run-clang-tidy -p build -header-filter='.*' -config="{Checks: '*', CheckOptions: [{key: UseAssignment, value: true}]}" -checks='-*,modernize-use-default-member-init' -fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-02-06 10:43:05 +01:00
Matthieu Gallien 76e88572d6
more fixes for attributes without init value
done with clang-tidy

run-clang-tidy -p build -header-filter='.*' -config="{Checks: '*', CheckOptions: [{key: UseAssignment, value: true}]}" -checks='-*,cppcoreguidelines-pro-type-member-init' -fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-02-06 10:43:05 +01:00
Matthieu Gallien 602b8db5e2
handle case clash conflicts in a similar way to content conflicts
introduce a new type of conflict for case clash filename conflicts

add proper handling including a new utility class to solve them and a
new dialog for the user to pick a fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-01-25 16:37:35 +01:00
alex-z 838817239a Fix CI errors for Edit Locally.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-06 15:31:24 +01:00
alex-z b673ab996e Edit locally job will only sync a specific file by modifying the state of the Sync Engine. All other running syncs will get terminated. Syncing is now optimized to run faster and it checks if the file has changed on the server before syncing it.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-06 09:37:03 +01:00
Matthieu Gallien 61c792c6f4
fully qualify types in signals and slots
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-15 09:57:54 +01:00
Claudio Cambra 421f5e723a Clean up methods in sync engine
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-10-25 11:05:46 +02:00
Claudio Cambra 80d0245acb Unschedule previously scheduled sync runs for locked files if it is found the sync run is no longer needed
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-04 11:52:23 +02:00
Claudio Cambra bbbfe3f1c4 More efficiently schedule sync runs for files that need delayed sync runs
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-04 11:52:23 +02:00
Matthieu Gallien 565a5f0999 add [[nodiscard]] attribute via clang-tidy
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-nodiscard' -fix
under linux with most part of our code covered

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-10-04 11:14:45 +02:00
Matthieu Gallien 8551a14c48 ensure SyncEngine use an initialized instance of SyncOptions
will prevent nextcloudcmd command line client from ignoring the settings
handled by SyncOptions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-08-08 12:36:37 +03:00
alex-z 53654b2a50 Allow manual renaming of files and folders with spaces. Allow uploading invalid file name via the InvalidFileName dialog.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-05-16 18:07:26 +03:00
Matthieu Gallien c194605c35 implement bulk upload
add PutMultiFileJob to send many files at once

use it in BulkPropagatorJob to implement bulk upload feature

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien 9658aea963 on switch to VFS real plugin, convert existing files to placeholders
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-04 15:02:27 +01:00
alex-z 6cafcc1124 Remove Temporary solution for file restoration issue due to failing to set the data-fingerprint.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-09-30 08:39:47 +00:00
Matthieu Gallien 25669938fd let clang-tidy add missing override after enabling again the check
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:56 +00:00
Hannah von Reth 5b457a1663 Use byte array for etag 2021-08-23 09:44:33 +02:00
allexzander a3d12a616b Add error message to GUI.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-15 14:33:45 +03:00
allexzander bc919bcc8c Temporary solution for file restoration issue due to failing the dataFingerprint on client.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-14 06:42:48 +00:00
Hannah von Reth 9d9eadba8e
Use time the request was send,..
not when it was processed by the client, to determine the quality of the connection.
2020-12-15 11:01:08 +01:00
Hannah von Reth f6faba48e2
Don`t block main thread when displaying all files removed dialog
Fixes: #8170
2020-12-15 10:59:25 +01:00
Kevin Ottens d22046d679
No need to fetch encryption data separately before discovery
This step isn't necessary anymore, no one looks at ClientSideEncryption
for that information anyway.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Olivier Goffart 115a53134c
SyncEngine: Save a bit of memory by not keeping a set of all filename
This is only used for conflict files, so only save conflict files.
(The _seenFile was used for other things in 2.5, but not anymore)
2020-12-15 10:59:01 +01:00
Christian Kamm 4c04351360
Fix warnings about signedness
Sizes are always qint64, not unsigned.
TransferIds are always uint.
2020-12-15 10:58:41 +01:00
Christian Kamm f89450648f
Vfs: Clarify SyncEngine::wipeVirtualFiles()
Possibly the behavior should actually change and the function should
de-placeholder all items, not just dehydrated ones.
2020-12-15 10:58:38 +01:00
Christian Kamm 4d58208676
File watcher: Reduce touch ignore duration
On Linux and Windows the file watcher can't distinguish between changes
that were caused by the process itself, like during a sync operation,
and external changes. To work around that the client keeps a list of
files it has touched and blocks notifications on these files for a bit.

The duration of this block was originally and arbitrarily set at 15
seconds. During manual tests I regularly thought there was a bug when
syncs didn't trigger, when the only problem was that my changes happened
too close to a previous sync operation.

This change reduces the duration to three seconds. I imagine that this
is still enough.

Also use std::chrono while at it.
2020-12-15 10:58:36 +01:00
Christian Kamm b91839b760
SyncEngine: Rename phase finishing slots
slotDiscoveryJobFinished -> slotDiscoveryFinished
slotFinished -> slotPropagationFinished

This should be clearer. Particular the
slotFinished -> finalize -> emit finished()
chain was confusing before.
2020-12-15 10:58:34 +01:00
Christian Kamm b30f79edf6
vfs: Ensure SyncOptions::_vfs is never null
- Create a VfsOff derived class
- Make it a shared pointer shared with Folder::_vfs
2020-12-15 10:58:26 +01:00
Christian Kamm 2b20985875
winvfs: initial work
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Olivier Goffart b86e1efc9a
Remove the backup deteciton code which was used for server < 9.1 2020-12-15 10:58:10 +01:00
Olivier Goffart c8eff3da2d
New Discovery algorithm: Remove the sync cleanup phase
Since we do not recurse within some directories, many files are not seen.

The stale entry will cleanup by themself as the sync engine try to remove
the files that are already removed.
Should we need to actually do this cleanup, it should be dotected in the
discovery.
2020-12-15 10:58:08 +01:00
Olivier Goffart 9401273daf
New discovery algorithm: Call FolderDiscovered 2020-12-15 10:58:02 +01:00
Olivier Goffart a36ed56f01
New Discovery algorithm: Refactor a bit the way the signal are emited 2020-12-15 10:58:02 +01:00
Olivier Goffart 8f3ce6e520
Fix TestDownload: _ignore_hidden_files was not properly initialized 2020-12-15 10:58:02 +01:00
Olivier Goffart ca32eb1cf7
More cleanup of csync remains 2020-12-15 10:58:01 +01:00
Olivier Goffart 0a6d2d0f46
Remove csync_update and csync_reconcile
I guess some other csync utilities can also be remove dnow but
that will be for later
2020-12-15 10:58:00 +01:00
Olivier Goffart f4a5167812
New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery 2020-12-15 10:57:59 +01:00
Olivier Goffart a384a2d1cb
New Discovery algorithm: Handle of move within a moved directory 2020-12-15 10:57:58 +01:00
Olivier Goffart f9a9be59e6
New discovery algo: Remote move
TestSyncMove::testRemoteChangeInMovedFolder
2020-12-15 10:57:57 +01:00
Olivier Goffart e934f6b27b
New discovery algo
Make TestSyncEngine::testSelectiveSyncBug pass
2020-12-15 10:57:57 +01:00
Olivier Goffart ec681ab2a5
New discovery algorithm: Initial work.
SyncEngineTest testFileDownload is passing
2020-12-15 10:57:56 +01:00
Olivier Goffart 4eb8997519
Download: Remove useless code and add a test
From issue #7015, the code is wrong because the path is the file system path and
not the path on the DB.
But since this is a conflict, this means the reconcile will still want to download
the file from the server next sync, so we need not to worry about this case
2020-12-15 10:57:50 +01:00
Christian Kamm d6078f958b
Placeholders: Download from shell integration 2020-12-15 10:57:49 +01:00
Kevin Ottens 0e2af4b502 Enable the modernize-deprecated-headers check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 14:53:52 +02:00
Kevin Ottens 0b1cf69134 Update the metadata table with encryption info before discovery
When the ClientSideEncryption object is fed, also serialize the
encryption info of the folders inside the metadata table.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 05:27:14 +00:00