1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-09-29 00:42:45 +02:00
Commit Graph

7788 Commits

Author SHA1 Message Date
Kevin Ottens
88986749a4
Use the SVG wizard logo when APPLICATION_ICON_SET says so
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-20 15:09:58 +01:00
allexzander
96472320e4 Fix e2ee folder move issue
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-14 15:54:30 +02:00
Kevin Ottens
1aeb77c967
Add the XAttr backend prototype with its test suite
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
7c8b7db725
Don't detect file changes during hydration for virtual files
Indeed, that file size will almost always change between the 1 byte
placeholder and the hydrated file. Only when using the CfAPI on Windows
this won't be the case since because it will expose the original size
even for placeholders.

Also worth noting: the suffix backend didn't hit that case since the
filename changes (with suffix for placeholders, without for hydrated
files).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
6e51dcf9c6
Provide the path to the current folder to statTypeVirtualFile on unix
Otherwise backends can't get to the actual file which will be needed for
the XAttr backend.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:03 +01:00
Kevin Ottens
a89b483773
Add the plumbing for a new extended attributes backend
Ideally this will end up being the backend we use for both Linux and
macOS but that will require work with desktop environments on the Linux
side and to reverse engineering at least on xattr value on macOS.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-14 12:57:02 +01:00
allexzander
bf5b214e0e E2EE fix upload parallelism issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-14 06:59:05 +00:00
Kevin Ottens
5325e058d8
Repair chunked uploads
There's been a confusion between the chunk number and the chunk
offset leading to corruptions... Let's pass the proper offset to
the UploadDevice again.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-13 18:00:19 +01:00
allexzander
4ed7feab2b Implement nested items removal when removing root encrypted folder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-11 21:12:58 +02:00
Kevin Ottens
2d8eb19ee5
Second attempt at fixing CfAPI wrapper build in Win32 mode
MSVC having so useless error messages it didn't quite point to the root
cause of the issue... it turns out that through the maze of macros
defined in the windows API, there's one which impacted the function
pointer definition of CfCloseHandle which would then not convert to
FileHandle::Deleter as expected. So I end up wrapping it in a lambda to
help... luckily this kind of lambdas decay into a simple function
pointer so there's likely no overhead it's just to coerce the compiler
into doing the right thing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-07 13:49:10 +01:00
Kevin Ottens
79a54d68ed
Revert "Fix CfAPI wrapper build in Win32 mode"
This reverts commit 3b3864296a.
2021-01-07 13:40:01 +01:00
Kevin Ottens
3b3864296a
Fix CfAPI wrapper build in Win32 mode
For some reason MSVC manages to deduce the right constructor in Win64
mode but not in Win32 mode. So let's be more explicit about what we
return.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-06 17:07:50 +01:00
Felix Weilbach
db0f1e245d Remove NO_SHIBBOLETH flag and dead code
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-01-05 12:58:58 +01:00
Hannah von Reth
09cc988026
Fix a possible crash with the remove all files dialog 2020-12-30 16:20:43 +01:00
Kevin Ottens
da3ff631ef
Use Q_REQUIRED_RESULT directly like in other places
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 16:20:42 +01:00
Hannah von Reth
72b6118c3e
Mark vfs functions as OC_REQUIRED_RESULT 2020-12-30 16:17:48 +01:00
Hannah von Reth
aadda32633
Handle errors in convertToPlaceholder 2020-12-30 16:17:47 +01:00
Hannah von Reth
552427ffc3
Update windows launch on start binary location
Fixes: #7672
2020-12-30 16:17:47 +01:00
Hannah von Reth
713a429675
Add todo for Qt 5.15 2020-12-30 16:17:47 +01:00
Hannah von Reth
1144473f5d
Cleanup pathtoUNC and its test 2020-12-30 16:17:46 +01:00
Hannah von Reth
51d73e27ea
Clarify comment 2020-12-30 16:17:46 +01:00
Hannah von Reth
3f873ed2ee
Simplify file comparison 2020-12-30 16:17:46 +01:00
Hannah von Reth
157d526129
Include auth type in http log 2020-12-30 16:17:46 +01:00
Hannah von Reth
f6f7789afa
Log the final http request 2020-12-30 16:17:41 +01:00
Kevin Ottens
46a5bd6b25
Ensure we properly cancel hydration on server errors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:59 +01:00
Kevin Ottens
e37a5f36b0
Don't look at virtual files data for the mimetype matches
Otherwise this would attempt to download the file everytime we check the
direct editor for a given file which wouldn't be adequate. Would also
lead to a deadlock in our case since that would happen in the main
thread and implicit hydration is driven from there as well.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
90fbb7d322
Implement callback between wrapper and vfs object for hydration requests
This comes with a test simulating an open request coming from another
process (although in our case it's really just a thread). The actual
hydration works as expected by cfapi, handling of encrypted files is for
now missing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
7668c521c1
Split the CfAPI lower level code in a wrapper
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
423780bf79
Add initial version of the CfApi backend
For now this implements only the logic necessary to get a test suite
equivalent to the TestSyncVirtualFiles one to pass. It doesn't (yet)
honor request to fetch files from the system.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:58 +01:00
Kevin Ottens
216b251b40
One byte placeholders assumption only holds for the suffix backend
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:57 +01:00
Kevin Ottens
4d4b87c9c3
Don't consider CfApi backend as experimental
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-30 09:44:53 +01:00
rakekniven
e1979fdb33 Removed translation for "etag" and changed spelling
Shouldn't be translated.

Just checked https://en.wikipedia.org/wiki/HTTP_ETag and all available localized pages.

Signed-off-by: rakekniven <mark.ziegler@rakekniven.de>
2020-12-28 08:51:56 +00:00
Hannah Rittich
5fc778bfaa Fixed the autostart for AppImages. See #2504.
Signed-off-by: Hannah Rittich <hrittich@users.noreply.github.com>
2020-12-21 11:56:09 +01:00
rakekniven
29d968ab15 Changed triple dot to ellipsis
Reported at Transifex.

Signed-off-by: rakekniven <mark.ziegler@rakekniven.de>
2020-12-21 08:00:29 +00:00
Camila
0e0ea9d81a Update the settings dialog window title.
Signed-off-by: Camila <hello@camila.codes>
2020-12-17 07:04:07 +00:00
Camila
625752f85d General settings: move buttons to the bottom left of their group boxes.
Signed-off-by: Camila <hello@camila.codes>
2020-12-17 07:04:07 +00:00
Camila
016410dbaa
Make monochrome icons the default on Linux and Mac OS.
Unless it is branded with other icons.

Signed-off-by: Camila <hello@camila.codes>
2020-12-16 14:42:24 +01:00
Kevin Ottens
af57a702ef
Workaround bug in older GCC used for the AppImage toolchain
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Kevin Ottens
0756497c3e
Get the excluded files test to pass again on Windows
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Kevin Ottens
c57eff6fd8
Please the clang-tidy overlord
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 11:01:53 +01:00
Hannah von Reth
c03a5da670
Don't warn if everything is fine 2020-12-15 11:01:53 +01:00
Hannah von Reth
4e373ca7ff
Remove now unneeded cmake test and define 2020-12-15 11:01:52 +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
Hannah von Reth
1b4ccea083
Owncloud - virtual files smaller <1KB - problems with syncing
The issue was caused by gziped responses not providing a
content lenght header.

Fixes: #8248
2020-12-15 10:59:27 +01:00
Hannah von Reth
96eaef6dba
Pause sync when remove all dialog is displayed
Fixes: #8263
2020-12-15 10:59:27 +01:00
Hannah von Reth
c253b51249
Use enum instead of int 2020-12-15 10:59:27 +01:00
Hannah von Reth
befc373ea6
Fix test on systems where C:\ is not writeable 2020-12-15 10:59:27 +01:00
Hannah von Reth
0eb8b01f0a
Fix usePlaceholders migration 2020-12-15 10:59:26 +01:00
Hannah von Reth
a083a37126
Fix vfs experimental text 2020-12-15 10:59:26 +01:00
Hannah von Reth
b2934a68bc
Fix folder permission check on NTFS
Fixes: #8187
2020-12-15 10:59:26 +01:00
Hannah von Reth
8dbdaed5c3
Fix condition 2020-12-15 10:59:26 +01:00
Hannah von Reth
e4a0222954
Append .exe to crashreporter path so it is better located 2020-12-15 10:59:25 +01:00
Hannah von Reth
440b31986a
Ensure the callback is triggered 2020-12-15 10:59:25 +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
Hannah von Reth
b4cb3ecb5a
Don't use exec() on dialogs 2020-12-15 10:59:25 +01:00
Hannah von Reth
4878042e61
Update libcrashreporter-qt 2020-12-15 10:59:25 +01:00
Hannah von Reth
7c65d38ba4
Draw active progressbar
Pass a widget to the progressbar in the folder delegate to draw the correct active state
2020-12-15 10:59:25 +01:00
Kevin Ottens
201dbd54db
Remove the plugin loader mechanism for VFS backends
We will have all the code in public anyway so it can just be compiled
in. Thus no need to go through the plugin loading dance. Replaced the
loading with factory functions. Kept mostly the same structure
otherwise.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
7e5f81ea81
Allow to control availability of folders in the settings dialog
It felt odd to be able to control the encryption status in the settings
dialog but not the availability. Also availability was controllable on
the root, so let's make it widely available.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
70c2dc70a1
Resurrect the display of subfolders for VFS sync folders
This got removed from the settings since in that case selective sync
isn't supported. Unfortunately that's also necessary to display them to
allow encrypting folders via the context menu.

So we display the subfolders again but in the case of VFS we disable the
ability to (un)check them. They just have an icon, a name and a context
menu.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
9f0e0b0f6a
Update the FolderStatusModel when a folder encryption ends
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
596bfab6e1
Set the account state after E2EE is setup in the GUI
Otherwise we would not display the E2EE message if the account was
connected before the creation of the settings dialog. This was likely
caused by the delayed creation of the settings dialog.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
f45e84f2ee
Remove empty action in the settings toolbar
This was causing an unwanted line in the middle of the bar.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:24 +01:00
Kevin Ottens
d63097475c
Fix typo and style
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
1acb2679dd
Get rid of now unused GetFolderEncryptStatusJob
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
36b8e7c2a4
Remove the encryption flag check from encrypted propagation code
If we use those encrypted propagation code paths, we already know from
the discovery phase (and thus the journal db) that the folders are
encrypted so no need to check again.

This will remove another expensive round trip with the server.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
b2533e6451
Remove encrypt status job fetching from ClientSideEncryption
This is now unused.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +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
Kevin Ottens
580b36fe20
Remove unused methods on ClientSideEncryption
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
ce5edfdf4d
Stop using e2e()->isFolderEncrypted() in the folder wizard
We used the same approach than for the FolderStatusModel by getting the
is-encrypted property straight from the LSCOL job.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens
4fde05b8b6
FolderStatusModel now uses the LSCOL job result for encryption status
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
8e5a8d9fb9
FolderStatusModel LSCOL job now gets the is-encrypted property
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
7a4a359704
Stop using e2e()->isFolderEncrypted() in the jobs
Thanks to the new discovery algorithm, we got all the freshest E2EE
information straight from the database so reuse it instead of going
through an in memory copy.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
37a51872e1
Set the encrypted flag in the database when EncryptFolderJob succeeds
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
b667bdda14
Change EncryptFolderJob path convention
It had a different path convention than all the other jobs, most likely
for legacy reasons because of the tight coupling it had to the settings
dialog.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
ee8e0fa332
Have the folder token inside the EncryptFolderJob
No need to look for a token on the outside we can just work properly by
keeping all the state encapsulated in the job.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:22 +01:00
Kevin Ottens
af00ef1cca
Don't use getFileRecordByE2eMangledName in jobs anymore
Thanks to the new discovery algorithm we got both mangled and original
file names in the item so no need to go through the database for
nothing.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Kevin Ottens
66f24241d8
Repair E2EE deletions
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Kevin Ottens
567f678fd5
Make sure the encrypted flag gets all the way to the journal db
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Kevin Ottens
961794669e
Repair E2EE uploads
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +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
Kevin Ottens
2cf76bbcbf
Repair the Windows Build
We now enforce the use of QStringLiteral and friends in some places,
but that feel through the cracks for some of the Windows specific code.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:21 +01:00
Hannah von Reth
dd3e70b667
VirtualFiles: Ensure the target location supports vfs
Fixes: #8131
2020-12-15 10:59:20 +01:00
Hannah von Reth
8796f25994
Log error code as hex 2020-12-15 10:59:20 +01:00
Hannah von Reth
44175aca94
Fix: Log chunked messages 2020-12-15 10:59:20 +01:00
Hannah von Reth
60011e8003
Remove vfs warning in the delegate, indicate them in the description instead
Fixes: #8139
2020-12-15 10:59:20 +01:00
Hannah von Reth
93152761a1
Use verbose function names instead of direct member access 2020-12-15 10:59:20 +01:00
Hannah von Reth
356192fb1d
Don't show 404 errors when manually creating folder sync pair.
Fixes: #7724
2020-12-15 10:59:20 +01:00
Hannah von Reth
1619cd5dcc
Use winvfs by default when adding folder sync connection
Fixes: #8083
2020-12-15 10:59:19 +01:00
Hannah von Reth
8460526df9
Clear cookies on logout 2020-12-15 10:59:19 +01:00
Hannah von Reth
f220151527
Remove the use of goto from src/csync/csync_exclude.cpp 2020-12-15 10:59:19 +01:00
Hannah von Reth
4f596dae8c
Log http status
Fixes: #8073
2020-12-15 10:59:19 +01:00
Hannah von Reth
020c6d6424
Fix placeholders are reverted to OnlineOnly
Fixes: #7779
2020-12-15 10:59:19 +01:00
Hannah von Reth
d58cdaeb2a
Crashreporter: Apply the same hdpi settings as to the main gui
Fixes: #8042
2020-12-15 10:59:18 +01:00
Hannah von Reth
0eabc75039
Improve log message 2020-12-15 10:59:18 +01:00
Hannah von Reth
f1f6257b5d
Windows VFS: Enable Windows VFS by default 2020-12-15 10:59:18 +01:00
Hannah von Reth
1aa1ea7bea
Return empty string instead of 1 as adler32 checksum for empty files 2020-12-15 10:59:18 +01:00
Hannah von Reth
23f7c51f70
Print checksum on mismatch 2020-12-15 10:59:18 +01:00
Hannah von Reth
fd6146d09e
Clazy: Fix some warnings 2020-12-15 10:59:18 +01:00