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

89 Commits

Author SHA1 Message Date
Matthieu Gallien
83a8058b51 improve logging for CfApi
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
072e9d44bd gracefully handle one case of invalid handles
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
a3013de6ea fix OCC::CfApiWrapper::handleForPath when path does not exist
sometime it can be called with a path that is already deleted

ensure we always go to the correct code path

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
9eed62a854 remove too noisy log print
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-23 13:41:29 +00:00
Matthieu Gallien
43ec429fe4 improve logs when place holder info cannot be read
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-04 15:02:27 +01:00
Matthieu Gallien
833237b2e4 use alias target for internal libraries
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-06 07:56:33 +00:00
Matthieu Gallien
c751fd5672 ensure DLL are generated with branded names
cmake distinct runtime and library

on unix dynamic shared libraries are library kind of objects
on windows they are runtime kind of objects

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-06 07:56:33 +00:00
Dmytro Korchynskyi
608fc5fb3a Fixed warnings by using static_cast
Signed-off-by: Dmytro Korchynskyi <kdl.dima@gmail.com>
2021-09-13 13:05:41 +03: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
allexzander
ba73b6d914 VFS + E2EE. Improved data alignment and unit tests for StreamingDecryptor. Refactoring and renaming for readability.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander
2c78925acb VFS + E2EE VFS implicit hydration of E2EE files.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
Felix Weilbach
3d72e24bb8 Brand name of vfs plugins
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-19 10:30:24 +00:00
Nicolas Fella
43cccb0a73 Don't use variables for CMake target identifiers
This makes the code a bit nicer to read and maybe a bit more robust.

Set the relevant OUTPUT_NAME target properties to keep the ability to
customize the names of the installed binaries.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-08-19 10:30:23 +00:00
Matthieu Gallien
2ee26bbd59 fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:31:19 +02:00
Matthieu Gallien
7c68408ee1 only compile xattr virtual files backend for linux platform (not unices)
for a reason a mac os platform specific file is missing and before xattr
plugin was compiled only for linux

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:10:54 +02:00
Matthieu Gallien
8ad6f89fed bring back dynamic load of VFS plugins
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-08 08:11:17 +00:00
Matthieu Gallien
c123edb173 address review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Matthieu Gallien
4016c2fab0 avoid error when doing hydration when data socket is closed too early
when data is received, if we close the socket they cannot be read

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Hannah von Reth
e7e218d8e6 Improve the error message returned by updateMetadata
Also properly handle the case the the file can't be converted to a placeholder
as it is locked
2021-07-06 14:03:53 +00:00
Matthieu Gallien
746072e95d fix all usage of _com_error(cfExecuteresult).ErrorMessage()
_com_error(cfExecuteresult).ErrorMessage() calls should be translated to
QString before use with qDebug and related logging facilities

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-02 11:19:04 +02:00
Valdnet
3937595eef l10n: Spelling unification
Spelling unification in Transifex.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-06-17 12:18:00 +00:00
Felix Weilbach
c799dbdd61 Cfapi: Make sure no data is transfered after cancellation
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-17 09:10:06 +00:00
Felix Weilbach
a89a84ff14 Mark placeholder in sync after updating the placeholder
Fixes #3403 #3082 #3391

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-14 13:40:26 +00:00
allexzander
bb55232e8e VFS freeze fix. Treat .sync-exclude.lst as a non-virtual file always.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-08 09:25:43 +00:00
Felix Weilbach
32b7e62359 Warn user if using e2ee and vfs together
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-18 11:50:18 +00:00
Felix Weilbach
c3a2587a91 Remove unnecessary cfapi logging statements
For big files that can add a lot lines to the log files.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-12 08:49:13 +00:00
allexzander
ef89256d39 VFS. Allow dehydartion of readonly files. Preserve 'readonly' flag when creating a placeholder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-06 06:17:36 +00:00
Matthieu Gallien
419bd93dea when files get hydrated indirectly through pinning, sets correct state
files that get downloaded not through an hydration request need to be
converted to placeholder

sets the expected state when converting them to placeholder files

 #3082

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 13:54:32 +02:00
Matthieu Gallien
929ae965ce prevent progress bar to appear after a download is finished with CfApi
when using Cloud Filter API with enabled VFS on Windows, a progress bar
stays visible for some time after hydration is completed. Not updating a
last time the progress bar prevents that.

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 13:54:32 +02:00
Matthieu Gallien
97d785f1bb fix errors when calling CfRegisterSyncRoot by setting more fields
sets a reasonable size of the StructSize members in the struct passed to
CfRegisterSyncRoot function

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-04-26 08:02:40 +00:00
allexzander
cb8b6ccd9b Ignore *.lnk files on Windows.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander
13f4bb541d Treat .lnk files as normal files without hydrating them or creating a placeholder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander
3906ae0922 Another way to fix this.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-07 09:08:02 +00:00
allexzander
0a33e99053 Create std::wstrings out of const wchar_t* so a copy is created every time.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-04-06 10:03:22 +03:00
allexzander
28771b25e3 Fix VFS CfAPI Syncroot Register Error.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-27 02:41:24 +02:00
allexzander
ab128cc4aa Revert "Merge pull request #3042 from nextcloud/temp-fix-vfs-failure-wow6432"
This reverts commit cafa475398, reversing
changes made to 003e56f4e6.
2021-03-26 22:25:31 +02:00
allexzander
9d15334813 Temp fix for vfs failure.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-26 21:41:44 +02:00
allexzander
193e50311b Refresh Windows download dialog progress when hydrating a placeholder
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-24 14:09:06 +02:00
Felix Weilbach
d78774f29e Check reading from journal was successful before remove placeholder
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-24 10:51:50 +00:00
Felix Weilbach
9bf5b5c7ba CFAPI: Handle cancelation of hydration requests
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-18 10:43:48 +00:00
allexzander
5f0344abb2 Fix warnings in CfApiWrapper.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
allexzander
3fde838bee Fix for Windows long path issue.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-03-18 12:07:07 +02:00
Felix Weilbach
523f1bcadd VFS Windows: Fix download of large files
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-04 09:05:17 +01:00
Felix Weilbach
4d05979be5 Log error message from CFAPI
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-02-27 17:44:26 +00:00
Kevin Ottens
ebfe51b7e7 Don't treat new folders in unpinned folders as files to dehydrate
This would only happen if the parent of the newly created folder would
be explicitly set to online only, hence why it went under the radar
previously.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 17:09:24 +00:00
Kevin Ottens
21035d48a6 Don't crash when the same request is filled twice
The OS might request the same file again if we take too much time to
fulfill a request. So in case it's queueing the same one again instead
of bailing out just fail the second one and let the first one finish
properly.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00:00
Kevin Ottens
d3c7218ee8 Be a bit more resilient with errors
In case we'd been to slow to fullfill or we're still processing a
cancelled request better not just crash. We still log the issue though.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 10:58:14 +00: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
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