Commit Graph

187 Commits

Author SHA1 Message Date
Matthieu Gallien 55034f7e43
properly compute if a folder is top level or child extern mounted
asks new permission to server to be able to know if a folder is a top
level mounted folder

should allow detecting the top level folders from external storages or
group folders

should also make the client reliably detect that it is handling a child
folder inside a group folder and be allowed to rename such folders

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-27 14:29:01 +01:00
alex-z c5dd2e89a1 E2EE. Fix root metadata fetching path for non-root remote sync folder. Refactoring. Stabilizing paths.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-03-20 00:54:27 +01:00
Matthieu Gallien b7c1a95d1c
fix missing tracking for some item rename operations
will fix mishandling of rename of a single file to multiple places
during discovery

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-05 16:43:05 +01:00
alex-z e9a0dbd16c Allow event processing between each XML parser run, to improve GUI performance.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-01-29 18:32:01 +01:00
alex-z af612525c4 End-to-End Encryption V2. Implemented sharing between users. Automatic migration from 1.0 to 2.0(only for flat folders). Improved secure filedrop.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-01-29 16:13:25 +01:00
Dimitri Papadopoulos 09521edbac Fix residual typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-16 20:36:56 +02:00
alex-z 0f7d29bce6 Ignore upload error items and schedule a new sync in case there are removed items that need to be downsynced.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-09-04 10:02:05 +02:00
Claudio Cambra a5d7c75e6f
Add additional logging for folder size check
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:23 +08:00
Claudio Cambra 21656cce17
Replace all manual isntancesof adding trailing slash with use of utility method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra ac8e9c4274
Fix trailing slash procedure in DiscoveryPhase::checkSelectiveSyncNewFolder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra 9fa5ae3604
Use simpler sort methods for white and black lists in discoveryphase
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra 017dca2328
Move findPathInList from discoveryphase to common syncjournaldb
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra 61057334f6
Do not notify if setting is not enabled for folders going over limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:38 +08:00
Claudio Cambra aa20c102b6
Properly check folder size on server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra 5acacdd4d8
Make checkFolderSizeLimit more task agnostic
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra 6f2e63d52f
Create and connect specific signal for existing folder now being discovered to be big
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra 7145d73f15
Add DiscoveryPhase::checkSelectiveSyncExistingFolder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:36 +08:00
Claudio Cambra e5f399ff51
Move active folder size limit check to independent convenience method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:36 +08:00
Claudio Cambra 17de46cec2
Clean up declaration of DiscoveryPhase::checkSelectiveSyncNewFolder by using const auto, renaming single letter variables, more
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:35 +08:00
Dries Mys 984d06e82a Convert VFS file to placeholder again if needed
Note that Windows may convert a placeholder file to a regular file when
it is replaced by another file, even if the old and new file (inode,
modified time, file size) are identical.

WIN32_FIND_DATA::dwReserved0 is only initialised in case of
FILE_ATTRIBUTE_REPARSE_POINT is set. This field is not a bit set. Check
corrected to only include all cloud reparse points and not other special
reparse points.

Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
2023-07-26 11:05:50 +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 3be820d9a3 Group folder visibility improvements. Show dropdown in tray window.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-05-09 12:25:05 +02:00
Matthieu Gallien 8659df2266
prevent downgrading e2ee metadata format after initial migration
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-03-31 17:18:29 +02:00
Matthieu Gallien 7c655cf679
use a getter to query encryption status
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-03-31 17:18:28 +02:00
alex-z b6ba1fe0d6 Implement Secure filedrop link share. Move data from 'filedrop' to 'files' when syncing E2EE folders.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-03-02 19:29:11 +01: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
Claudio Cambra 8c556287b8
Split if statement conditions in enqueueDirectoryToDelete into separate lines
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-01-24 17:00:15 +01:00
Claudio Cambra 6146f7d5cf Add 'emit' keyword to signal emissions that were missing them
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-12-20 12:07:55 +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
allexzander 6affc6e6ab Implement 'Leave this share' context menu entry. Fix incorrect sharing state for incoming and my shares in custom state icons and local database.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-11-22 12:14:20 +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 2b3efbfb2a Accept valid lsColJob reply XML content types
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-09-12 13:57:31 +02:00
Matthieu Gallien dc95f29165 fetch and store in sync database information abot lock state of files
fetch lock properties from server

decode them and store them in sync database

test to ensure we do properly handle those properties

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-05-02 13:52:05 +02:00
Matthieu Gallien 541447723a remove all usage of QDateTime::toTime_t() to avoid overflow
QDateTime::toTime_t() can overflow if called with a date outside its
domain of working

this method is obsolete and QDateTime::toSecsSinceEpoch() is the
replacement

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
alex-z 01eb050cd8 Do not remove files from a Group folder and its nested folders whe it is renamed or removed while not allowed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-03-09 10:54:39 +02:00
rakekniven 5cec3c3ca1 l10n: Fixed grammar
Reported at Transifex.

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2022-01-13 09:39:13 +00:00
alex-z b66ba8ba0a Added sync stop when failed to cancel delete jobs.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-15 13:41:30 +00:00
alex-z 6381acf85b Do not crash on findAndCancelDeletedJob.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-12-15 13:41:29 +00:00
Matthieu Gallien a62905f17a properly extract the file id when querying server
use the proper local file id to get the e2ee meta data

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-02 08:15:54 +00:00
Hannah von Reth 5b457a1663 Use byte array for etag 2021-08-23 09:44:33 +02:00
allexzander c28cac8479 VFS + E2EE placeholder size migration from old versions.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
Hannah von Reth 926a52b33d Remove unused computation 2021-08-11 17:13:44 +00:00
Hannah von Reth c03a5da670
Don't warn if everything is fine 2020-12-15 11:01:53 +01:00
Hannah von Reth ebd8047cb6
Replace custome date parser QDateTime::fromString(value, Qt::RFC2822Date) 2020-12-15 11:01:52 +01: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
Kevin Ottens 1d07af07a5
Start hooking up E2EE to the new discovery algorithm
Now we pull the encrypted metadata during the discovery which is a
better approach than before. This shall remove the need for some of the
deep propfinds we have been using so far. It already simplifies the code
a bit for the download scenario.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Hannah von Reth 0eabc75039
Improve log message 2020-12-15 10:59:18 +01:00
Hannah von Reth fd6146d09e
Clazy: Fix some warnings 2020-12-15 10:59:18 +01:00
Hannah von Reth 8c3749cbe2
Log state before specific assertion 2020-12-15 10:59:16 +01:00
Hannah von Reth 4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00